Using KSAM/XL and KSAM 64 (32650-90886)

Appendix B 247
BASIC/V Intrinsics
BKREAD
Values are read from the current record into the variables specified in
parameterlist
according to the type and length of the variable. For example, consider the following code:
10 DIM G$(3),H$(3),S$(4)
20 INTEGER L,F
30 CALL BKREAD (F,S$,G$,H$,L)
If the record being read contains only the word SCRABBLE, this word is read into the
specified variables as if they were assigned by the statements:
100 G$="SCR"
110 H$="ABB"
120 L=NUM("LE")
NOTE
Each variable in the
parameterlist
is filled to its current physical length
before proceeding to the next variable.
The following calls omit the
parameterlist
in order to skip forward two records:
210 CALL BKREAD(F,S$)
220 CALL BKREAD(F,S$)
The records skipped are not the next records physically placed on the file, but are the next
two in logical sequence according to the value of the current key. The particular key used
for the read sequence can be selected with a call to BKSTART or BKREADBYKEY. BKSTART can
also be used to position the file to the beginning of the record with the lowest key value in
the selected key.
The example in Figure B-5. assumes that the record pointer has been positioned to the
beginning of the first record in primary key sequence. Assume that the file being read was
opened in the example in Figure B-4. the records read were written in the example in
Figure B-13.
Each record contains five integers followed by five undefined words followed by a string of
three characters. The record is read into: