First Procedure

If the List contains at least one value, then the first element returned. If not, an error is thrown.
Declaration
function First(list as List of T) as T

Parameters

Return value

The first element of list.

Example

This example program shows how to use First and Len together.
Code
sub PrintFirstNumberIfPresent(x as List of Number)
if Len(x) > 0 then
print First(x)
else
print "Empty list!"
end if
end sub
sub Main()
dim x = [1, 2, 3]
PrintFirstNumberIfPresent x
dim y as List of Number
PrintFirstNumberIfPresent y
end sub
Output
1
Empty list!