Docs » Autodocs » dos.library » StrToLong
StrToLong -- string to long value (decimal) (V36)
characters = StrToLong(string,value) D0 D1 D2 LONG StrToLong(STRPTR, LONG *)
Converts decimal string into LONG value. Returns number of characters converted. Skips over leading spaces & tabs (included in count). If no decimal digits are found (after skipping leading spaces & tabs), StrToLong returns -1 for characters converted, and puts 0 into value.
string - Input string. value - Pointer to long value. Set to 0 if no digits are converted.
result - Number of characters converted or -1.
Before V39, if there were no convertible characters it returned the number of leading white-space characters (space and tab in this case).
|