Futurebasic/Language/Reference/xrefat

XREF@

edit

Syntax

edit
XREF@ arrayName maxSub1 maxSub2 AS dataType

Description

edit

XREF@ is identical to the XREF statement, except that the link variable is interpreted as a handle, rather than as a pointer. You should use XREF@ when you want the contents of a relocatable block to be treated as an array.

Example

edit

The following declares an array called inclination!, allocates a new block with enough room for numElts& elements, and associates the inclination! array with the contents of the block.

XREF@ inclination!(1)
inclination& = FN NEWHANDLE(numElts& * SIZEOF(SINGLE)

Notes

edit

Note that, because the value of maxSub1 is ignored in the XREF@ statement, we can arbitrarily set it to 1. However, when we actually reference the elements of the inclination! array, we can specify any subscript value in the range 0 through numElts&-1.

See Also

edit

DIM; XREF