Download smartBASIC user`s manual

Transcript
smart BASIC Core Functionality
User Manual
offset
BYVAL offset AS INTEGER
This is the offset relative to the position defined by the ‘whence’ parameter.
whence
BYVAL whence AS INTEGER
This parameter specifies from which position the offset is to be calculated. It shall
be 1 to specify from the current position, 2 from the end of the while and then for
all other values from the beginning of the file.
When the start position is ‘end of file’ then a positive ‘offset’ value is used to
calculate backwards from the end of file. Hence supplying a negative value has
no meaning.
Interactive
Command
NO
//See the full and detailed example in the FOPEN section
FSEEK is a core language function.
Non-Volatile Memory Management Routines
These commands provide access to the non-volatile memory of the module and provide the
ability to use non-volatile storage for individual records.
NvRecordGet
FUNCTION
NVRECORDGET reads the value of a user record as a string from non-volatile memory.
NVRECORDGET (recnum, strvar$)
INTEGER, the number of bytes that were read into strvar$. A negative value is
returned if an error was encountered:
Returns
Exceptions
Description
Recnum is not in valid range or is unrecognised.
Failed to determine the size of the record.
The raw record is less than 2 bytes long (possible flash
-3
corruption).
Insufficient RAM.
-4
Failed to read the data record.
-5
 Local Stack Frame Underflow
 Local Stack Frame Overflow
Error
-1
-2
Arguments
recnum
byVal recnum AS INTEGER
The record number to be read, in the range 1 to n, where n is the maximum
number of records allowed by the specific module.
strvar$
byRef strvar$ AS STRING
The string variable that will contain the data read from the record.
Interactive
NO
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
182
Laird Technologies
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852-2268-6567 x026