Category | Native procedure | ||||
Format | (date+ date int) | ||||
Parameters |
|
||||
Description | date+ adds int days to the date date and returns the result as a date. | ||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Category | Native procedure | |||
Format | (date-day date) | |||
Parameters |
|
|||
Description | date-day returns the day of month part of a date as an integer value in the range 1..31. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | ||||||
Format | (date-diff date1 date2) | ||||||
Parameters |
|
||||||
Description | date-diff computes the difference between the dates in days (taking care of month lengths, leap years, of course). The result is be returned as an exact integer. The result is positive when date1 is after date2. | ||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | |||
Format | (date-month date) | |||
Parameters |
|
|||
Description | date-month returns the month part of a date as an integer value in the range 1..12, where 1 is January, 2 is February, and so on. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Deprecated | |||
Format | (date-time) | |||
Parameters | none | |||
Description | date-time reads the current date and time from the system clock and returns them as a list of integers in the format (year month day hour minute second day-of-week). day-of-week is 0 for Sunday, 1 for Monday etc. This function is deprecated in V3.0 and later. You should use the foreign type "date" and its assorted functions instead. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | |||
Format | (date-year date) | |||
Parameters |
|
|||
Description | date-year returns the year part of a date as an integer value in the range 1904..2031, which is the domain dictated by PalmOS. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Primitive procedure | |||||||||
Format | (date? obj) | |||||||||
Parameters |
|
|||||||||
Description | date? returns #t for a date and #f for any other object. | |||||||||
R4RS Compliance | LispMe extension | |||||||||
Examples |
|
Category | Native procedure | |||||||||
Format | (day-of-week date) | |||||||||
Parameters |
|
|||||||||
Description | day-of-week returns the day of week of a date as an integer value in the range 0..6, where 0 is Sunday, 1 is Monday, and so on. Thus the result can be used as an index into the PalmOS resources containing the day names, see examples. | |||||||||
R4RS Compliance | LispMe extension | |||||||||
Examples |
|
Category | Primitive procedure | ||||||
Format | (dbref? obj) | ||||||
Parameters |
|
||||||
Description | dbref? returns #t for an open database (obtained by dm-open-db) and #f for any other object. | ||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Special form | ||||||||
Format |
|
||||||||
Parameters |
|
||||||||
Description | define associates a name with a value. The first form
simply evaluates an expression and binds a name to it. The second
form creates a procedure with the parameters formals
as described at lambda
and binds var to it. In LispMe, every name used must have been defined before, so every variable used in expri must have been defined in the same binding group (see loading), in a previously loaded memo or manual definition before, or in the case of a local definition, in the enclosing construct. In fact, a group of definitions (like a memo to be loaded, or a list of definitions enclosed in a begin expression entered into the command line) or a group of local definitions is treated like a letrec binding group; this means that every name used in this group must have been defined before or must be defined in this binding group (for mutual recursive definitions). This assures that every name can be statically resolved at compile time and there's no symbol table left to be checked at runtime. Each source memo must consist of a sequence of define-expressions. You can enter definitions in the REP-loop, and each definition will create a frame with a single variable binding. Local definitions are allowed whereever an expression sequence is. (The body of a begin-, case-, cond-, lambda-, let-, or letrec-expression) In this case, all definitions must occur before any other expression in the body or you'll see this error. The return value of a definition is #n in this implementation. | ||||||||
R4RS Compliance | See here | ||||||||
Examples |
|
Category | Special form | ||||||
Format | (delay expr) | ||||||
Parameters |
|
||||||
Description | delay packages expr together with the current lexical environment into a promise, which may be evaluated (using force) later. The first time the promise is forced, the delayed expression will be evaluated in the captured environment, and the result will be memoized. Subsequent forcing of this promise always returns the memoized value. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Native procedure | |||
Format | (delete-file string) | |||
Parameters |
|
|||
Description | delete-file deletes the memo with name
string from the MemoPad database. Deleting is
done with the DmRemoveRecord function, so the memo
is actually deleted (not just its delete-flag set), so if you
hotsynced the memo to your desktop, the next HotSync will
restore it onto your Pilot, as HotSync has no indication that
the memo has been deleted on the Pilot and it assumes that the
memo was freshly created on the desktop. So there's no danger
loosing valuable memos when they have been hotsynced. The return value is #n. |
|||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Deprecated use dm-delete-rec instead | ||||
Format | (delete-record dbname recnum) | ||||
Parameters |
|
||||
Description | delete-record opens the Pilot database named
dbname (case-sensitive!) and deletes
the record with index recnum from it
(using DmRemoveRecord, not just setting the
deleted attribute). #t is returned on success or
#f if the database or the index doesn't exist or on
other errors. Warning: Don't delete records from other applications' databases when you're not absolutely sure how DBs are used by them! |
||||
R4RS Compliance | LispMe extension. | ||||
Examples |
|
Category | Native procedure | ||||||
Format | (dir [category]) | ||||||
Parameters |
|
||||||
Description | dir creates a list of the names of all memos in
the MemoPad database. A memo name is its first line, truncated
to 16 characters like all file names are handled in LispMe. Using
the optional category argument, you can restrict
the list to the specified category. If the category named doesn't
exists, an empty list is returned. Matching of category names
is case-sensitive, as PalmOS distinguishes case
in category names. Private records won't appear in the list if you chose Hide private records in the security application. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | |||
Format | (disasm closure) | |||
Parameters |
|
|||
Description | disasm returns the SECD code of a closure
(see lambda) as a list.
You should never modify this list with
set-car! or the like, as you'll probably get
this error or even
a Fatal exception! This procedure is intended for debugging purposes and the curious LispMe user. The opcodes are listed in vm.h, but please note that some instructions contain further information in certain bits or environment frames may appear in the result. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | ||||||
Format | (display obj [outport]) | ||||||
Parameters |
|
||||||
Description | display prints an object to the output field or to the output port outport in human-readable format, i.e. strings and chars are not escaped. No space is appended after output. display returns obj. Printing objects is described here. For related information, see newline and write. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Native procedure | ||||||||||||
Format | (divide int1 int2) | ||||||||||||
Parameters |
|
||||||||||||
Description | divide divides two integer numbers and returns both the (integer) quotient and the remainder as a pair. Division by zero is an error. | ||||||||||||
R4RS Compliance | LispMe extension | ||||||||||||
Examples |
|
Category | Native procedure | ||||
Format | (dm-archive-rec dbref recnum) | ||||
Parameters |
|
||||
Description | dm-archive-rec sets the deleted attribute
of the record
at postition recnum in the database
dbref, but leaves the contents intact. Thus, the
conduit can archive the data to the PC at the next HotSync and
finally remove the actual record from the Palm. See also dm-delete-rec and dm-remove-rec. On success, #t is returned, otherwise #f. |
||||
R4RS Compliance | LispMe extension. | ||||
Examples |
|
Category | Native procedure | |||
Format | (dm-close-db dbref) | |||
Parameters |
|
|||
Description | dm-close-db closes the open database dbref and returns #t on success. If an error occurs (e.g., the specified database has already been closed), #f is returned. | |||
R4RS Compliance | LispMe extension. | |||
Examples |
|
Category | Native procedure | ||||||||
Format | (dm-create-db dbname creator type resource) | ||||||||
Parameters |
|
||||||||
Description | dm-create-db creates a new Pilot database named
dbname (case-sensitive!) with creator ID
creator and type type. If
resource is true, a resource database
is created, otherwise a record database is created. You should
definitely have a look at the Palm SDK documentation to
understand the difference between record and resource databases and
the recommended creator/type IDs. The return value is #t
on success and #f otherwise. Please note that the new database is not opened automatically, call dm-open-db to open it. |
||||||||
R4RS Compliance | LispMe extension. | ||||||||
Examples |
|
Category | Native procedure | |||||||||||||||||||||||||||||||||
Format | (dm-db-info dbref) | |||||||||||||||||||||||||||||||||
Parameters |
|
|||||||||||||||||||||||||||||||||
Description | dm-db-info returns a list of ten values
describing general information about the open database
dbref.
|
|||||||||||||||||||||||||||||||||
R4RS Compliance | LispMe extension. | |||||||||||||||||||||||||||||||||
Examples |
|
Category | Native procedure | ||||||
Format | (dm-db-list type creator) | ||||||
Parameters |
|
||||||
Description | dm-db-list returns a list of all database names having the specified type type and creator creator. Both type and creator can either be a 4 character string to search for an exact match (case-sensitive!) or the empty string as a wildcard. | ||||||
R4RS Compliance | LispMe extension. | ||||||
Examples |
|
Category | Native procedure | |||
Format | (dm-db-size dbref) | |||
Parameters |
|
|||
Description | dm-db-info returns a list of three values
describing size information about the open database
dbref.
|
|||
R4RS Compliance | LispMe extension. | |||
Examples |
|
Category | Native procedure | |||
Format | (dm-delete-db dbname) | |||
Parameters |
|
|||
Description | dm-delete-db deletes the Pilot database named
dbname (case-sensitive!) and all its records,
therefore the usual warnings apply :-) The return value is #t on success and #f otherwise. |
|||
R4RS Compliance | LispMe extension. | |||
Examples |
|
Category | Native procedure | ||||
Format | (dm-delete-rec dbref recnum) | ||||
Parameters |
|
||||
Description | dm-delete-rec deletes the contents of the record
at postition recnum from the database
dbref, but leaves the header structure intact and
sets the deleted attribute, so that the record will be
actually deleted on the next HotSync. See also dm-remove-rec and dm-archive-rec. On success, #t is returned, otherwise #f. |
||||
R4RS Compliance | LispMe extension. | ||||
Examples |
|
Category | Native procedure | |||||||||||||||
Format | (dm-get-rec-attr dbref recnum) | |||||||||||||||
Parameters |
|
|||||||||||||||
Description | dm-get-rec-attr reads the attributes of the record
with index recnum from the open database
dbref. The attributes are represented as an
integer which is the logical or of the following bitfields:
(see System/DataMgr.h)
|
|||||||||||||||
R4RS Compliance | LispMe extension. | |||||||||||||||
Examples |
|
Category | Native procedure | ||||||
Format | (dm-insert-rec dbref recnum rec) | ||||||
Parameters |
|
||||||
Description | dm-insert-rec creates a new record in the
database dbref. The record is filled with the
contents of the string rec and inserted at
position recnum into the database. Remember that
records in a database are accessed by contiguous integer indices and thus
all records at indices greater recnum are
shifted upwards. recnum may be larger than the number of records in the database, in this case the new record is inserted at the very end. In any case, on success the actual record number is returned, on failure #f. Use dm-open-db to open a database. |
||||||
R4RS Compliance | LispMe extension. | ||||||
Examples |
|
Category | Native procedure | ||||||||
Format | (dm-insert-rsrc dbref type id res) | ||||||||
Parameters |
|
||||||||
Description | dm-insert-rsrc creates a new resource record in the
resource database dbref.
The record is filled with the
contents of the string res and inserted at resource
id id under resource type type
into the database. On success, #t is returned, on failure #f. |
||||||||
R4RS Compliance | LispMe extension. | ||||||||
Examples |
|
Category | Native procedure | |||
Format | (dm-num-recs dbref) | |||
Parameters |
|
|||
Description | dm-num-recs returns the number of records in the open database dbref. If an error occurs (e.g., the specified database has already been closed), #f is returned. | |||
R4RS Compliance | LispMe extension. | |||
Examples |
|
Category | Native procedure | ||||||||||||||||||
Format | (dm-open-db dbname mode) | ||||||||||||||||||
Parameters |
|
||||||||||||||||||
Description | dm-open-db opens the Pilot database named
dbname (case-sensitive!) in mode mode
and returns a reference to the open database. The open mode can be
any disjunction of the bitflags (see System/DataMgr.h)
Garbage collection automatically closes unused databases, but you can (and should) close a database explicitely with dm-close-db. |
||||||||||||||||||
R4RS Compliance | LispMe extension. | ||||||||||||||||||
Examples |
|
Category | Native procedure | ||||
Format | (dm-read-rec dbref recnum) | ||||
Parameters |
|
||||
Description | dm-read-rec reads the record with index recnum from the open database dbref. The record is returned as a string. If an error occurs (e.g., the specified record doesn't exist or the database is a resource database), #f is returned. Use dm-open-db to open a database. | ||||
R4RS Compliance | LispMe extension. | ||||
Examples |
|
Category | Native procedure | ||||
Format | (dm-read-rsrc type id) | ||||
Parameters |
|
||||
Description | dm-read-rsrc searches all open resource databases
for a resource of type type
with resource id id and returns it
as a string. If the resource is not found,
#f is returned. Open resource databases are tracked by PalmOS itself. The last opened resource database is searched first. In addition to all explicitely opened resource databases, LispMe itself and System resources are searched (last). The type parameter determines the type of the resource to be read and is written as a string of 4 bytes, which is more readable than the Pilot API convention which builds a 32-bit integer from the 4 bytes. Please refer to the PalmOS documentation for more detailed information about Pilot resources. |
||||
R4RS Compliance | LispMe extension. | ||||
Examples |
|
Category | Native procedure | ||||
Format | (dm-remove-rec dbref recnum) | ||||
Parameters |
|
||||
Description | dm-remove-rec removes the record at postition
recnum from the database dbref.
The record is physically removed from the database, in contrast
to dm-archive-rec and
dm-delete-rec. Since records in a database are accessed by contiguous integer indices, all records with indices > recnum are shifted downards. On success, #t is returned, otherwise #f. |
||||
R4RS Compliance | LispMe extension. | ||||
Examples |
|
Category | Native procedure | ||||||
Format | (dm-remove-rsrc dbref type id) | ||||||
Parameters |
|
||||||
Description | dm-remove-rsrc removes the resource with type type and resource id id from the resource database dbref. The resource is physically removed, there are no logical deletion functions for resources. On success, #t is returned, on failure #f. | ||||||
R4RS Compliance | LispMe extension. | ||||||
Examples |
|
Category | Native procedure | |||
Format | (dm-rsrc-db? dbref) | |||
Parameters |
|
|||
Description | dm-rsrc-db? returns #t if the open databas dbref is a resource database, #f if it is a record database. It must be a valid database referenece a priori. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | |||||||||||||||
Format | (dm-set-rec-attr dbref recnum attr) | |||||||||||||||
Parameters |
|
|||||||||||||||
Description | dm-set-rec-attr sets the attribute byte of the record
with index recnum in the open database
dbref to attr.
The attributes are represented as an
integer which is the logical or of the following bitfields:
(see System/DataMgr.h)
Warning: Don't change the "deleted" bit, it may cause memory corruption! |
|||||||||||||||
R4RS Compliance | LispMe extension. | |||||||||||||||
Examples |
|
Category | Native procedure | ||||||
Format | (dm-update-rec dbref recnum rec) | ||||||
Parameters |
|
||||||
Description | dm-update-rec locates the record with index
recnum in the
database dbref and replaces it by the
contents of the string rec. The updated
record is marked as dirty. On success, recnum is returned, on failure #f. |
||||||
R4RS Compliance | LispMe extension. | ||||||
Examples |
|
Category | Native procedure | ||||||||
Format | (dm-update-rsrc dbref type id res) | ||||||||
Parameters |
|
||||||||
Description | dm-update-rsrc locates the resource with type
type and resource id id in the
resource database dbref and replaces its
contents by res. On success, #t is returned, on failure #f. |
||||||||
R4RS Compliance | LispMe extension. | ||||||||
Examples |
|
Category | Special form (compiler extension) | ||||||||||||
Format | (do ((var init [step]) ...) (test expr ...) (stmt ...)) | ||||||||||||
Parameters |
|
||||||||||||
Description | do is a general looping mechanism. First, each
initi is evaluated in an unspecified
order and each vari is bound to the
corresponding value. On each iteration, test is evaluated first. When it is true, the exprj are evaluated in left to right order and the value of the last one is returned as the value of the whole do expression. If it is false, the stmtk are evaluated in left to right order. Next, all vari are rebound by evaluating the corresponding stepi and the next iteration begins. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Native procedure | ||||
Format | (draw x y) | ||||
Parameters |
|
||||
Description | draw draws a line from the current point stored in
*gstate* to (x,y)
using the colors, drawing mode and drawing pattern stored in
*gstate*.
After that, the current point is updated
to (x,y). See here for details on the graphic state. The return value is #n to avoid trashing the graphics. |
||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Back to index A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Other