160
CipherLab BASIC Programming Part I
EMPTY_FILE
Purpose To remove all the records from a specified DBF file.
Syntax EMPTY_FILE(file%)
Remarks “file%
” is an integer variable in the range of 1 to 5, indicating which DBF file to
be accessed.
Note that if this function is called at the beginning of the program, data will be
deleted after the battery is replaced or System Menu is launched.
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
EMPTY_FILE(DBFNum%)
ELSE