MAINSAIL Language Manual, Section 40.1

previous   next   top   contents   index   framed top   this page unframed


40.1. last

Figure 40–1. last
$BUILTIN COMPILETIME
INTEGER
PROCEDURE   last        (STRING s);

last returns the character code for the last character of a STRING.

If s is the empty STRING, -1 is returned. -1 is not a valid character code.

Example 40–2. Use of last
last("abc") = 'c' = 99 # assuming the ASCII character set
last("") = -1


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 40.1