Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to input into dialog edit box in currency format
#4
Macro Macro2027
Code:
Copy      Help
str e7Pri="234.5"
;str e7Pri="20"
;str e7Pri="88234.599"
;str e7Pri=""

double d=val(e7Pri 2) ;;convert string to number format
e7Pri.format("%07.2f" d) ;;format string from double, like with C/C++ printf function
out e7Pri

;f - format as double, without E.
;.2 - always 2 digits after ..
;7 - minimum 7 characters length.
;0 - prepend 0 if need, instead of spaces.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)