MAINSAIL Language Manual, Section 35.7

previous   next   top   contents   index   framed top   this page unframed


35.7. first

Figure 35–7. first
$BUILTIN COMPILETIME
INTEGER
PROCEDURE   first       (STRING s);

first returns the character code for the first character of the STRING s.

If s is "", -1 is returned. -1 is not a valid character code.

Example 35–8. Use of first
first("abc") = 'a' = 97 # assuming the ASCII character set
first("") = -1


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 35.7