164
CipherLab BASIC Programming Part I
UPDATE_RECORD
Purpose
To update the record, which the file pointer of a specified DBF and IDX files is
pointing to.
Syntax UPDATE_RECORD(file%, index%, data$)
Remarks “file%
” is an integer variable in the range of 1 to 5, indicating which DBF file to
be accessed.
“index%
” is an integer variable in the range of 1 to 3, indicating which IDX file
to be accessed. If it is not specified, the default IDX file which keeps the
original data sequence will be used.
“data$” is a string variable, representing the ch
aracter string to replace the old
data.
Example
ON COM(1) GOSUB HostCommand
…
HostCommand:
Cmd$ = READ_COM$(1)
CmdIdentifier$ = LEFT$(Cmd$, 1)
DBFNum% = VAL(MID$(Cmd$, 2, 1))
IDXNum% = VAL(MID$(Cmd$, 3, 1))
CardID$ = RIGHT$(Cmd$, LEN(Cmd$)-3)
IF CmdIdentifier$ = “&” THEN
UPDATE_RECORD(DBFNum%, IDXNum%, CardID$)
ELSE