Please enable JavaScript to view this site.

A-Shell Consolidated Reference

xcall GETBYT, channel, buffer, bytes

GETBYT reads a specified number of bytes from an open input file.

Parameters

channel (Num)  [in]

is the channel number of the file, which must be open for input.

buffer (BLOB)  [out]

Receives the data.

bytes  (Num)  [in]

Specifies the number of bytes to read, which must be less than or equal to the size of buffer.

Comments

Use the EOF(Channel) function to test for end of file condition before each call to GETBYT.

You can get a similar effect with INPUT RAW, except that it always reads a number of bytes equal to the size of the specified variable.

Note that GET performs a similar operation but is somewhat more sophisticated.

See Also