2.6 I created a string variable (proved by TYPEOF = 2) with the value 0119. When I perform SHOWVAR, I see 0119, but when I dereference the variable to create a file name, the name is XX119 and NOT XX0119. How do I keep the leading zero when I dereference the variable?
From Jeff Vance:
You need to ensure that the CI treats the variable as a string. Enclosing it in quotes can do this, or by using it as a parameter in any CI function that expects a string. E.g.,
:setvar x "0119"
:calc typeof(x)
2 %2 $2 <<string>>
:setvar y x
:calc typeof(y)
2 <<still a string>>
:setvar y !x
:calc typeof(y)
1 <<int>>
:setvar y "!x"
:calc typeof(y)
2 <<string again>>