MAINSAIL Language Manual, Section 46.21

previous   next   top   contents   index   framed top   this page unframed


46.21. $removeReal

Figure 46–26. $removeReal
STRING
PROCEDURE   $removeReal (MODIFIES STRING s;
                         
OPTIONAL BITS ctrlBits);

$removeReal reads a REAL representation from the beginning of s. $removeReal returns the null STRING if s does not begin with a valid STRING representation of a REAL value; otherwise, it removes the longest prefix of s that represents a valid REAL STRING (as if the PROCEDURE read had been called to read a REAL 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 REAL value.

If s does not begin with a valid REAL 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.21