User`s guide
146
CipherLab BASIC Compiler
User's Guide
5.20.1 DAT Files
This one has a sequential file structure, which is much like the ordinary sequential file but is
modified to support FIFO structure. We call this type of file as DAT file. Because DAT files
are usually used to store transaction data, they are also referred to as Transaction files. The
length of each record in the transaction file is limited to 250 bytes. For portable terminals, a
BASIC program can have up to 6 transaction files.
DEL_TRANSACTION_DATA
Purpose
To remove a block of transaction data from the default transaction file.
Syntax
DEL_TRANSACTION_DATA(N%)
Remarks
This command will only have an effect on the first (default) transaction file.
"N%" is an integer variable, determining how many transaction records to be
deleted and how to delete.
If "N%" is a positive integer, the specified number of records will be deleted from
the top of the transaction file 1, i.e. the oldest records will be deleted.
If "N%" is a negative integer, the specified number of records will be deleted from
the bottom of the transaction file 1, i.e. the latest records will be deleted.
Example
...
PRINT "Discard the latest transaction? (Y/N)"
...
Loop:
KeyData$ = INKEY$
IF KeyData$ = "" THEN
GOTO Loop
ELSE IF KeyData$ = "Y" THEN
DEL_TRANSACTION_DATA(-1)
END IF
...
See Also
DEL_TRANSACTION_DATA_EX, EMPTY_TRANSACTION
DEL_TRANSACTION_DATA_EX
Purpose
To remove a block of transaction data from a specified transaction file.