MAINSAIL Language Manual, Section 46.17

previous   next   top   contents   index   framed top   this page unframed


46.17. $removeInteger

Figure 46–21. $removeInteger
STRING
PROCEDURE   $removeInteger
                        (
MODIFIES STRING s;
                         
OPTIONAL BITS ctrlBits);

$removeInteger reads an integer representation from the beginning of s. $removeInteger returns the null STRING if s does not begin with a valid STRING representation of an integer value; otherwise, it removes the longest prefix of s that represents a valid integer STRING (as if the PROCEDURE read had been called to read an integer value from s).

The only valid ctrlBits bit is discard. If set, initial blank, tab, end-of-page, carriage return, and linefeed characters are removed from s before looking for the integer value.

If s does not begin with a valid integer STRING representation (following whitespace characters if discard is set), s is not altered.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 46.17