first

first(): MemberType;

The first method of the JadeBytes class returns the first byte (that is, the Byte element at position 1) from the binary content of the receiver. If the JadeBytes object is empty, an exception is raised.

The following example shows the use of the first method.

vars
    bytes : JadeBytes;
begin
    beginTransaction;
    create bytes;
    bytes.setContent("JADE".Binary);
    commitTransaction;
    write bytes.first;           // Writes 74 (ASCII value "J")
epilog
    delete bytes;
end;