Yes, this is caused by automatic data-type conversion. This is by design, for backward compatiblity. If you know the size of the string you can always append leading zeroes, for example Dim s, string MyFunction s Format s, "000000", s MessageBox s : How do I keep a script library from suppressing : leading zeroes in the return values? I have found that when : I am returning a string from a script library that has numeric : characters, but no alphabetic characters 24x7 will suppress : the leading zero. I would expect this if I was returning : a numeric type, but not when I am returning a : string (even though it is composed of numbers). : It seems that 24x7 is converting the string into a numeric : before returning it. If I concat an alphabetic char to the end : of the string 24x7 will not suppress the zero. : Is this by design or is this a bug?
|