Category | Constant | ||||||||||||
Format | #f | ||||||||||||
Description | #f is the only boolean value false. It is self-evaluating, so quoting is not necessary. Note that #f and '() are different values in LispMe, so '() means true in logical expressions. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Constant | ||||||||
Format | #n | ||||||||
Description | #n is a special object, which suppresses printing when it's the result of an evaluation. When #n is imbedded in a list, it will print as #n, but when the entire result is #n, nothing will be printed at all. This is especially useful for graphics programs, as any output caused by the REP-loop overwrites the graphics. | ||||||||
R4RS Compliance | LispMe extension | ||||||||
Examples |
|
Category | Constant | |||||||||
Format | #t | |||||||||
Description | #t is the canonical boolean value true. It is self-evaluating, so quoting is not necessary. Note that all objects other than #f mean true in logical expressions. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Constant | ||||||||||||
Format | '() | ||||||||||||
Description | '() or (quote ()) is the empty list. There's no nil in LispMe (anymore), use '() instead. Though you can omit the apostrophe when writing the empty list, it's not recommended. Note that '() and #f are different values in LispMe, so '() means true in logical expressions. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Primitive procedure | ||||||||||||
Format | (* numi ...) | ||||||||||||
Parameters |
|
||||||||||||
Description | * multiplies any number of arbitrary numbers. Type conversion (integer to real, real to complex) is handled automatically. If the product is to large to be represented as an integer, it's an error in LispMe for PalmOS1. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Variable |
Format | *font* |
Description | *font* is a one-element list whose
car contains the
font number for drawing graphic text with
text.
Available fonts are
You should never set! *font* to another value, because LispMe expects a fixed location for this variable, instead use set-car! to update it, or simply use the functions in the demo ; Graphic utilities. |
R4RS Compliance | LispMe extension |
Category | Variable |
Format | *pat* |
Description | *pat* is a one-element list whose
car contains the
pattern used for graphic operations
draw,
rect, and
text.
Allowed values are
|
R4RS Compliance | LispMe extension |
Category | Variable |
Format | *point* |
Description | *point* is a pair whose
car contains the current
x coordinate and whose
cdr contains the current
y coordinate of
the graphics cursor. These coordinates define the starting point of
draw,
rect, and
text. You should never set! *pat* to another value, because LispMe expects a fixed location for this variable, instead use set-car! and set-cdr! to update it, or simply use the functions in the demo ; Graphic utilities. |
R4RS Compliance | LispMe extension |
Category | Primitive procedure | ||||||||||||
Format | (+ numi ...) | ||||||||||||
Parameters |
|
||||||||||||
Description | + adds any number of arbitrary numbers. Type conversion (integer to real, real to complex) is handled automatically. If the sum is to large to be represented as an integer, it's an error in LispMe for PalmOS1 | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Primitive procedure | |||||||||
Format | (- num1 [num2]) | |||||||||
Parameters |
|
|||||||||
Description | When given one number, - negates it, when given two numbers, - calculates the difference of them. Type conversion (integer to real, real to complex) is handled automatically. If the difference is to large to be represented as an integer, it's an error in LispMe for PalmOS1. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure | |||||||||||||||
Format | (/ num1 [num2]) | |||||||||||||||
Parameters |
|
|||||||||||||||
Description | When given one number, / returns its inverse, when given two numbers, / divides them. If both of them are integers and the division leaves no remainder, the result is also an integer. Type conversion (integer to real, real to complex) is handled automatically. In LispMe for PalmOS1 the result is truncated to an integer, which means that / is equivalent to quotient. Division by zero is an error. | |||||||||||||||
R4RS Compliance | Full | |||||||||||||||
Examples |
|
Category | Primitive procedures | |||||||||
Formats |
|
|||||||||
Parameters |
|
|||||||||
Description | These procedures compare two objects of compatible types and return
their relation, either #t or #f. Both objects must
be either
|
|||||||||
R4RS Compliance | In addition to arithmetic comparison, these procedures deal with
chars and strings, too, and thus subsume the R4RS
procedures char<?, char<=?,
char>?, char>=?, string<?,
string<=?, string>?, and
string>=?. Only two arguments are accepted in each case |
|||||||||
Examples |
|
Category | Library procedure | ||||||
Format | (= num1 num2) | ||||||
Parameters |
|
||||||
Description | = returns #t, if num1 is equal to num2. Otherwise it returns #f. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Library procedure | ||||||
Format | (abs num) | ||||||
Parameters |
|
||||||
Description | abs computes the absolute value of num. The type of the result is the same as the argument's, with the exception of -16384, as it is not representable as an integer and therefore coerced to a float. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | ||||||||||||
Format | (acos z) | ||||||||||||
Parameters |
|
||||||||||||
Description | acos computes the arc cosine of z
in radians.
For complex arguments z = x + yi,
the formula |
||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | ||||||||||||
Format | (acosh z) | ||||||||||||
Parameters |
|
||||||||||||
Description | acosh computes the hyperbolic arc cosine
of z.
For complex arguments z = x + yi,
the formula |
||||||||||||
R4RS Compliance | LispMe extension | ||||||||||||
Examples |
|
Category | Special form | |||||||||
Format | (and expr1 ...) | |||||||||
Parameters |
|
|||||||||
Description | and evaluates the expri in left to right order. If any expression is false, the evaluation is finished. In any case, the value of the last expression evaluated is returned. Remember that '() is considered true in LispMe. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | |||||||||
Format | (angle z) | |||||||||
Parameters |
|
|||||||||
Description | angle computes the angle of the number z. The angle is always in the range -pi (exclusive) and pi (inclusive). See also atan. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure | ||||||||||||
Format | (append listi ...) | ||||||||||||
Parameters |
|
||||||||||||
Description | append creates a list consisting of all the elements of the listi in the order of the arguments. The original lists are not modified, but the last list is not copied and shares structure with the result. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Primitive procedure | ||||
Format | (apply procedure arglist) | ||||
Parameters |
|
||||
Description | apply calls procedure passing
each element in arglist to
procedure. The result of calling
procedure is returned. apply is especially useful when dealing with procedures with variable length argument lists, see examples. | ||||
R4RS Compliance | Full | ||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | ||||||||||||
Format | (asin z) | ||||||||||||
Parameters |
|
||||||||||||
Description | asin computes the arc sine of z
in radians.
For complex arguments z = x + yi,
the formula |
||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | |||||||||
Format | (asinh z) | |||||||||
Parameters |
|
|||||||||
Description | asinh computes the hyperbolic arc sine
of z.
For complex arguments z = x + yi,
the formula |
|||||||||
R4RS Compliance | LispMe extension | |||||||||
Examples |
|
Category | Library procedures | ||||||||||||
Formats |
|
||||||||||||
Parameters |
|
||||||||||||
Description | These procedures return the first element in alist, whose car is obj. If none is found, #f is returned. To compare obj with the keys, assoc uses equal?, assq uses eq?, and assv uses eqv?. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | ||||||||||||
Format |
|
||||||||||||
Parameters |
|
||||||||||||
Description | atan computes the arc tangent
of z in radians.
For complex arguments z = x + yi,
the formula With the second form, the result is an angle whose tangent is y/x, but the signs of the arguments decide which of the two angles differing by pi is returned. It's the same value as (angle (make-rectangular x y)) |
||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | |||||||||
Format | (atanh z) | |||||||||
Parameters |
|
|||||||||
Description | atanh computes the hyperbolic arc tangent
of z.
For complex arguments z = x + yi,
the formula |
|||||||||
R4RS Compliance | LispMe extension | |||||||||
Examples |
|
Category | Special form | |||
Format | (begin expr1 expr2 ...) | |||
Parameters |
|
|||
Description | begin evaluates each expri in sequence
from left to right. The value of the last
expri is returned. A second use of begin is to group mutually recursive define expressions entered into the command line. | |||
R4RS Compliance | Full | |||
Examples |
|
Category | Primitive procedure | ||||||||||||
Format | (boolean? obj) | ||||||||||||
Parameters |
|
||||||||||||
Description | boolean? returns #t for the boolean values #t and #f and returns #f for any other object. Remember that in LispMe () and #f are distinct objects. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Primitive procedures | |||||||||
Format | (c...r pair) | |||||||||
Parameters |
|
|||||||||
Description | c...r applies a sequence of car and cdr procedures to pair and returns the result. The ... may be any combination of upto 3 a or d, where an a corresponds to car and a d corresponds to cdr. (cxyzr pair) is equivalent to (cxr (cyr (czr pair))), where each x, y and z is either a or d. | |||||||||
R4RS Compliance | Supports upto 3 nested applications instead of 4 | |||||||||
Examples |
|
Category | Primitive procedure | ||||||
Format | (call/cc procedure) | ||||||
Parameters |
|
||||||
Description | call/cc calls procedure with the
current continuation as its argument. The current continuation
is a special procedure (recognized by
continuation?)
of one argument and represents the remainder of the computation
from the call/cc-application. The continuation may
be called at any time later with any argument, which will be
the result of the call/cc-application. This may
happen several times, as the continuation has unlimited extent
like any other LispMe object, even when call/cc has
returned once. If the continuation is not called, the value returned by procedure is the value of this call/cc-application. |
||||||
R4RS Compliance | The verbose name call-with-current-continuation is not supported, you probably don't want to write this with Graffiti! | ||||||
Examples |
|
Category | Primitive procedure | ||||||||||||
Format | (car pair) | ||||||||||||
Parameters |
|
||||||||||||
Description | car returns the car component of pair. The car component is the first argument given in the cons procedure. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Special form | ||||||
Format | (case expr (guard expr1 expr2 ...) ...) | ||||||
Parameters |
|
||||||
Description | case first evaluates expr and tests
sequentially, if its value is (using
eqv?) in one of
the constant lists guard.
When the first match is encountered,
its corresponding expri are evaluated from
left to right and the value of the last
expri is returned. Note that the constant lists must not be quoted! The special keyword else can be used for an "otherwise" clause. It's an error, if no guard matches. |
||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Primitive procedure | ||||||||||||
Format | (cdr pair) | ||||||||||||
Parameters |
|
||||||||||||
Description | cdr returns the cdr component of pair. The cdr component is the second argument given in the cons procedure. | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | ||||||
Format | (ceiling num) | ||||||
Parameters |
|
||||||
Description | ceiling converts num to a floating point number and returns the smallest whole number greater than or equal to num. The result is not a LispMe integer, it's a floating point value | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Primitive procedure | ||||||
Format | (char->integer char) | ||||||
Parameters |
|
||||||
Description | char->integer returns the ASCII code of char. You should use a tool like AsciiChart to see characters and their codes on your Pilot. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Primitive procedure | |||||||||
Format | (char? obj) | |||||||||
Parameters |
|
|||||||||
Description | char? returns #t for a character and #f for any other object. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure | ||||||||||||
Format | (complex? obj) | ||||||||||||
Parameters |
|
||||||||||||
Description | complex? returns #t for integer, real and complex numbers and #f for any other object. In fact, it's the same procedure as number? | ||||||||||||
R4RS Compliance | Full | ||||||||||||
Examples |
|
Category | Special form | |||||||||
Format | (cond (guard expr1 expr2 ...) ...) | |||||||||
Parameters |
|
|||||||||
Description | cond evaluates each guard in sequence.
When the first true guard is encountered,
its corresponding expri are evaluated from
left to right and the value of the last
expri is returned. The special keyword else, which is always true, can be used for an "otherwise" clause. It's an error, if no guard is true. |
|||||||||
R4RS Compliance | Expression sequence in each clause must not be empty | |||||||||
Examples |
|
Category | Primitive procedure | |||||||||
Format | (cons obj1 obj2) | |||||||||
Parameters |
|
|||||||||
Description | cons returns a freshly allocated pair whose car component is obj1 and whose cdr component is obj2. The new pair is always unique, i.e. it is not eq? to any other object. The procedures car and cdr are used to access the components of the pair. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure | |||||||||
Format | (continuation? obj) | |||||||||
Parameters |
|
|||||||||
Description | continuation? returns #t for a continuation created with call/cc and #f for any other object. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | |||||||||
Format | (cos z) | |||||||||
Parameters |
|
|||||||||
Description | cos computes the cosine of the number z.
z is an angle measured in radians.
For complex arguments z = x + yi,
the formula |
|||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure (PalmOS2 only, MathLib required) | |||||||||
Format | (cosh z) | |||||||||
Parameters |
|
|||||||||
Description | cosh computes the hyperbolic cosine of the number
z.
For complex arguments z = x + yi,
the formula |
|||||||||
R4RS Compliance | LispMe extension | |||||||||
Examples |
|
Catalog of Language Elements D - L