158
CipherLab BASIC Programming Part I
ADD_RECORD
Purpose To add a record to a specified DBF file.
Syntax ADD_RECORD(file%, data$)
Remarks “file%
” is an integer variable in the range of 1 to 5, indicating which DBF file to
be accessed.
“data$
” is a string variable, representing the character string which user
intends to add to the specified DBF file.
Example
ON COM(1) GOSUB HostCommand
…
HostCommand:
Cmd$ = READ_COM$(1)
CmdIdentifier$ = LEFT$(Cmd$, 1)
DBFNum% = VAL(MID$(Cmd$, 2, 1))
CardID$ = RIGHT$(Cmd$, LEN(Cmd$)-2)
IF CmdIdentifier$ = “+” THEN
ADD_RECORD(DBFNum%, CardID$)
ELSE