I often have to place leading zeros on a number so I am very happy with using for example Format>%.6d,43,result which sets result to 000043. However I did find that there is a limit of 16 for the precision parameter and if the decimal number being modified is too large the result is a number that appears to be gibberish. (see the example below.)
Hoping that the Format> pointer parameter might create a pointer to a memory location so we can use an extended set of Microsoft APIs that for example, require pointers to structures. But I could not find any way to format the Format>%p that did not give me an error.
Anyone have any experiences or information they'd like to share?
Code: Select all
//Format: convert decimal to hexadecimal
Format>%x,324234,result
//VBScript: convert hexadecimal to decimal
VBEval>CLng("&h" & "%result%"),dec
//VBScript: convert decimal to hexadecimal
VBEval>hex(324234),result2
//Format: pad 16 zeros to the left of a 4 place integer
//returns a left padded 16 place integer.
Let>data=1234
Format>%.16d,data,result
MDL>result
//Format: pad 17 or more zeros to the left of a 4 place integer
//returns the original number
Let>data=1234
Format>%.17d,data,result
MDL>result
//Format: pad 16 zeros to the left of an 18 place integer
//returns ???
Let>data=123456789123456789
Format>%.16d,data,result
MDL>result