Associatesan array definition with a file, allowing random access input and output.
array_definition An expression that defines the data type and dimensions of the associated data.
offset The offset in the file to the start of the data in the file. For stream files and RMS block mode files, this offset is given in bytes. For RMS record-oriented files, this offset is specified in records.
TIP: The offset parameter is useful for skipping past descriptive header blocks in files.
UNIX Users: ASSOC does not work with UNIX FORTRAN binary files.
image_file
.img, with five 512-by-512 byte images and a 1024-byte header:
OPENR 1, 'image_file.img'
aimage = ASSOC(1, BYTARR(512, 512), 1024) image1 = aimage(0)
image5 = aimage(4)
TVSCL, aimage(2)
fft_image = FFT(aimage (1), -1)
arow = ASSOC(1, BYTARR(512), 1024) row100 = arow(99)
PLOT, arow(512)