SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Return values from script libraries

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Return values from script libraries
Author Message
Jamie



Joined: 12 Jan 2004
Posts: 5

Post Return values from script libraries Reply with quote

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?

Mon Jan 12, 2004 12:54 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Return values from script libraries Reply with quote

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?

Mon Jan 12, 2004 2:50 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.