Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
First and Last Functions
◄Summary► ◄Details► ◄Example► ◄Back►
Argument
<ordinal type> Ordinal type identifier
Returns
<same type as argument> First or last value in ordinal
type list
Description
The First function returns the first value in the list of values
for the given ordinal type. The Last function returns the last
value in the list of values. An ordinal type can be a subrange, a
predefined type, or a user-defined enumerated type.
Argument Type Example Call Return
═════════════════════════════════ ════════════════ ══════
Boolean First( Boolean ) False
Integer First( Integer ) -32768
Subrange Days=1..31 First( Days ) 1
Enumerated type Days=(Mon,Tue,Wed) First( Days ) Mon
Argument Type Example Call Return
══════════════════════════════════ ═══════════════ ══════
Boolean Last( Boolean ) True
Integer Last( Integer ) 32767
Subrange Days=1..31 Last( Days ) 31
Enumerated type Days=(Mon,Tue,Wed) Last( Days ) Wed