Next: , Previous: , Up: Data Classes   [Contents][Index]


6.2.6 Associated Variables

An associated variable links a record with a particular array structure to a logical unit, and allows access to and modification of the file opened on the logical unit (if any) by records. No file need be opened on the logical unit when the associated variable is created.

Create an associated variable with function assoc (assoc). For instance:

z = ASSOC(1, FLTARR(200,300))

associates a record with the structure of a float array of 200 by 300 elements with logical unit number 1. After such an assignment, z(i) refers to the ith record (of 200 by 300 float elements) in the file linked to logical unit 1.