Home
Free Midlets
Help

POINT #

Syntax: POINT #channel, expression
channel
Channel is a integer value between 0 and 9. A channel is associated with a specific file when a file is opened.
recordNumber
This is a integer value that is used to select the next record to be read or written. The first record is always record 1. Additional records are added sequentially.

POINT is used to set the current file offset where the read and write operations are to be performed. The POINT and NOTE commands are used together to perform Random Access File I/O. The POINT command may be given the following values:-

< 0
Position read / write pointer to end of file. Usually used to append data to the file.
> fileSize
Position read / write pointer to end of file. Usually used to append data to the file.
0
Position read / write pointer to start of file.
n
Position read / write pointer to arbitrary position in file

Important Note: Earlier versions of Mobile BASIC (1.4 and earlier) were record orientated. The values returned by NOTE and POINT indicated the record number. You could only select which record to read/write - not the specific byte within the record.