Back to index
LispMe C datatype support
LispMe can read/write data in binary format dictated by C language
conventions. Thus LispMe can interpret the databases of the builtin
or third-party applications. The basic concept is reading/writing a
substring of a buffer retrieved by dm-read-rec (remember, a
LispMe string can contain arbitrary binary data including NUL
bytes, since its length is stored elsewhere).
To avoid creating a substring for each access, every buffer access function
includes a byte offset into the buffer.
The C/PalmOS datatypes supported are:
In any case, the length of the buffer is checked so that no adjacent
bytes are overwritten or read.
- signed 8, 16, or 32 bit integers
- unsigned 8, 16, or 32 bit integers
- IEEE-754 32 bit single precision and
64 bit double precision floating point numbers
- PalmOS date, time, and timestamp values
- NUL-terminated C strings
Other applications for these functions are
- constructing the parameter block for launching other PalmOS applications.
- implementing homogenuous vectors (see SRFI nr. xxx) in terms of strings.
(the typecodes already match!)
Associated language elements