GET$$ statement

Purpose | Reads WIDE string data from a file opened in binary mode.
Syntax | GET$$ [#] Filenum&, Count&, StrgVar
Filenum& | The file number under which the file was opened.
Count& | Specifies how many WIDE characters to read from the file.
StrgVar | The string variable which receives the data. It can be a dynamic string, fixed-length string, nul-terminated string, or field string. StrgVar may be either ANSI or WIDE. If it is an ANSI variable, the data is automatically converted to ANSI bytes before it is assigned.

Remarks

GET$$ reads Count& WIDE characters from file number filenum&, and assigns them to StrgVar. GET$$ and PUT$$ provide a low-level alternative to sequential and random-access file-processing techniques, allowing you to deal with files on a character-by-character basis.

File filenum& must have been opened in binary mode. Characters are read starting at the current file pointer position, which can be set with the SEEK statement. When the file is first opened, the pointer is at the beginning of the file (position 1, by default, unless BASE=0 was specified in the OPEN statement). After GET$$, the file pointer position is automatically advanced to the position immediately following the data read.

See also | EOF, GET, GET$, INPUT#, LINE INPUT#, LOF, OPEN, PRINT#, PUT, PUT$, PUT$$, SEEK, WRITE#