GET
Read Disk by Sector
This directive reads data from a specific disk sector rather than from an OPEN File. This directive is available only in MS-DOS but is not valid on MS-DOS network drives.
Syntax
Section titled “Syntax”GET disk-num, sector-num [,ERR=line-ref|,ERC=error-code],string-variabledisk-num- specifies a logical disk directory on the disk drive. Valid values are 0 through 35.
sector-num- is an integer specifying the number of the 256-byte sector from which to start reading.
line-ref- is the program line number or label to branch to if this directive produces an error.
error-code- is a programmer-defined error code. Valid values are positive or negative whole numbers.
string-variable- is the name of a string variable, which has already been defined to a specific size, which receives the data to be read from the disk.
Remarks
Section titled “Remarks”The string-variable must already be defined to a specific length. The amount of data that the GET directive READs is determined by the initial length of string-variable.
The sector-num is a relative sector number with sector 0 being the first sector used on the disk drive containing the logical disk directory specified by disk-num.
Examples
Section titled “Examples”GET 2, 4, A$accesses logical disk directory 2 and reads data into the predimensioned variable A$ for the length of A$.
GET X, Y, ERR=7800, A$If X=2 and Y=4, has the same effect as the first example and branches to statement 7800 if an error occurs while processing this directive.
See also
Section titled “See also”PUT directive
From the Thoroughbred Basic Language Reference, Volume II: F–Q, version 8.9.1. Open this page in the PDF