Category | Native procedure | ||||||||||||
Format | (random int) | ||||||||||||
Parameters |
|
||||||||||||
Description | random generates a random number in the range [0..abs(int)-1]. int may not be 0 or an error results. | ||||||||||||
R4RS Compliance | LispMe extension | ||||||||||||
Examples |
|
Category | Native procedures | ||||||||||||
Formats |
|
||||||||||||
Parameters |
|
||||||||||||
Description | These procedures return the first element in alist, whose cdr is obj. If none is found, #f is returned. To compare obj with the values, rassoc uses equal?, rassq uses eq?, and rassv uses eqv?. | ||||||||||||
R4RS Compliance | LispMe extension | ||||||||||||
Examples |
|
Category | Native procedure | |||
Format | (read inport) | |||
Parameters |
|
|||
Description | read reads an object from the input port inport. It uses the standard LispMe parser to create an object from its textual representation, so all kind of syntax errors are possible. In this case, the input position of inport is not advanced. The type of the object is solely determined by the data input. If the end of file is found while reading, a unique end-of-file object (which is recognized by eof-object?) is returned. | |||
R4RS Compliance | The port parameter is not optional. Use input to let the user input an expression. | |||
Examples |
|
Category | Native procedure | |||
Format | (read-char inport) | |||
Parameters |
|
|||
Description | read-char reads a single characters from the input port inport and returns it. If the end of file is found while reading, a unique end-of-file object (which is recognized by eof-object?) is returned. | |||
R4RS Compliance | The port parameter is not optional. | |||
Examples |
|
Category | Native procedure | |||
Format | (read-line inport) | |||
Parameters |
|
|||
Description | read-line reads successive characters from the input port inport until a line feed is encountered and returns all chars read as a string. If the end of file is found while reading, a unique end-of-file object (which is recognized by eof-object?) is returned. | |||
R4RS Compliance | LispMe extension. Use input-string to let the user input a string. | |||
Examples |
|
Category | Deprecated use dm-read-rec instead | ||||
Format | (read-record dbname recnum) | ||||
Parameters |
|
||||
Description | read-record opens the Pilot database named dbname (case-sensitive!) and reads the record with index recnum from there. The record is returned as a string. If either the database or the index doesn't exist, #f is returned. | ||||
R4RS Compliance | LispMe extension. | ||||
Examples |
|
Category | Deprecated use dm-read-rsrc instead | ||||
Format | (read-resource restype resid) | ||||
Parameters |
|
||||
Description | read-resource searches all open resource databases
for a resource of type restype
with resource id resid and returns it
as a string. If the resource is not found,
#f is returned. Searched resource databases are
|
||||
R4RS Compliance | LispMe extension. | ||||
Examples |
|
Category | Native procedure | |||||||||
Format | (real-part z) | |||||||||
Parameters |
|
|||||||||
Description | real-part computes the real part of the number z. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure | ||||||||||||
Format | (real? obj) | ||||||||||||
Parameters |
|
||||||||||||
Description | real? returns #t for integer and real numbers and #f for any other object. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Native procedure | ||||||
Format | (rect x y radius) | ||||||
Parameters |
|
||||||
Description | rect draws a filled rectangle from the current point
stored in
*gstate*
to (x,y)
using the colors, drawing pattern and drawing mode stored in
*gstate*.
radius is
used for rectangles with rounded corners, it specifies the radius
of a circle by which the corners are rounded. To draw a plain
rectangle, use 0 for radius.
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 |
|
Category | Primitive procedure | |||||||||||||||
Format | (remainder int1 int2) | |||||||||||||||
Parameters |
|
|||||||||||||||
Description | remainder divides two integer numbers and returns the remainder. The sign of the result is always the sign of the dividend (or 0), in contrast to modulo. Division by zero is an error. | |||||||||||||||
R4RS Compliance | Full | |||||||||||||||
Examples |
|
Category | Native procedure | ||||||
Format | (reverse list) | ||||||
Parameters |
|
||||||
Description | reverse creates a newly allocated list consisting of the elements of list in reverse order. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Native procedure | ||||||
Format | (rgb->index r g b) | ||||||
Parameters |
|
||||||
Description | rgb->index searches the system colortable (palette)
for a color matching the given r g b values. The
algorithm is described in the SDK docs: Palm OS SDK Reference Palm OS 3.5 supports a maximum of 256 colors. The number of possible RGB colors greatly exceeds this amount. For this reason, an exact match may not be available. If there is no exact RGB match, then a luminance best-fit is used if the color lookup table is entirely gray scale (red, green, and blue values for each entry are identical), or a shortest-distance fit in RGB space is used if the palette contains colors. RGB shortest distance may not always produce the actual closest perceptible color, but it's relatively fast and works for the system palette. The result is an integer denoting the best palette entry. On systems running older OS versions than 3.5, 0 is returned. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | |||
Format | (rom-version) | |||
Parameters | none | |||
Description | rom-version returns the version number of the PalmOS ROM as a hex string consisting of 8 characters. See sysFtrNumROMVersion in System/SystemMgr.h for and explanation of this number. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Primitive procedure (MathLib required) | ||||||
Format | (round num) | ||||||
Parameters |
|
||||||
Description | round converts num to a floating point number and returns the closest whole number. The result is not a LispMe integer, it's a floating point value. | ||||||
R4RS Compliance | Full | ||||||
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