at

at(index: Integer64): MemberType;

The at method of the Array class returns a reference to the entry in the array at the position specified by the index parameter; for example:

firstCustomer := currentList.at(1);

The following examples show the use of the bracket ([]) operators to return an entry from an array.

firstCustomer := currentList[1];
display(): String;
vars
    temp, alphaNumber : String;
    entry : Integer;
begin
    temp := self.faultNumber.String;
    if temp.length > 4 then
        alphaNumber := temp;
    else
        entry := 0;
        while entry < 4 - temp.length do
            alphaNumber := alphaNumber & (0).String;
            entry := entry + 1;
        endwhile;
        alphaNumber := alphaNumber & temp;
    endif;
    return alphaNumber & " " & self.history.at(1)[1:100];
end;

If there is no entry at the specified index, an exception is raised.