jaco0646 wrote:
On the
SetFormat page, in the
padding section, it should be explicitly stated that integers are not padded. They must be converted to floats first.
+1
Also the part of following example creates confusion:
Code:
Var = 11.333333
SetFormat, float, 6.2
Var -= 1 ; Sets Var to be 10.33 with one leading space because the total width is 6.
SetFormat, float, 0.2
Var += 1 ; Sets Var to be 11.33 with no leading spaces.
SetFormat, float, 06.0
Var += 0 ; Sets Var to be 000011
; Convert a decimal integer to hexadecimal:
SetFormat, IntegerFast, hex
Var += 0 ; Sets Var (which previously contained 11) to be 0xb.
Var .= "" ; Necessary due to the "fast" mode.
SetFormat, IntegerFast, d
Could be altered as
Code:
Var = 11.333333
SetFormat, float, 6.2
Var -= 1 ; Sets Var to be 10.33 with one leading space because the total width is 6.
SetFormat, float, 0.2
Var += 1 ; Sets Var to be 11.33 with no leading spaces.
SetFormat, float, 0
Var += 0 ; Rounds-off Var to 11
SetFormat, float, 06.0
Var += 0.0 ; Sets Var to be 000011
; Convert a decimal integer to hexadecimal:
SetFormat, IntegerFast, hex
Var += 0 ; Sets Var (which previously contained 11) to be 0xb.
Var .= "" ; Necessary due to the "fast" mode.
SetFormat, IntegerFast, d