Thank you, I'll keep that in mind. Do you know of performance
differences in either, or do you think it would be best to always use
the atoll() function? Also, since we are on v5r2 and could use the
%dec() bif, is there a benefit to using one over the other?
I did notice a couple of caveats to the atoi() function that I didn't
have time to add yesterday.
1) It doesn't 'error' out if you pass it invalid numeric data (could be
good or bad)
2) It does partial translation if there is an embedded character in
your string (example; '5A55' becomes 55)
Even though neither Scott nor I included it in our code samples you
should definitely do some sort of test on the string to be sure there
is valid data in it.
Glenn Hopwood
Sr Programmer/Analyst
Electric Mobility
856-468-1000 x2545
Scott Klement <sk@xxxxxxxxxxxxxxxx>
Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>
Hi Glenn,
> * Prototype of a c-function used to convert alpha to integer
> D atoi pr 10i 0 extproc('atoi')
> D str * value options(*string)