...
> How do I keep the leading zero when I dereference the variable?
You need to ensure that the variable is treated as a string by the CI.
This can be done by enclosing it in quotes, or using it as a parameter
to any CI functions 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>>
HTH,
Jeff Vance, CSY