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

Alphabetic catalog of Language elements E

eof-object?

eof-object? recognizes the end-of-file object.

Category Primitive procedure
Format (eof-object? obj)
Parameters
objany object
Description eof-object? returns #t for the end-of-file object, which is returned by procedures read, read-char, peek-char, and read-line when they encounter the end of a memo; and #f for any other object.
R4RS Compliance Full
Examples
(eof-object? (read (open-input-file "bar"))) => #t, if the memo bar is empty
(eof-object? "baz") => #f

eq?

eq? recognizes identical objects.

Category Primitive procedure
Format (eq? obj1 obj2)
Parameters
obj1any object
obj2any object
Description eq? returns #t if obj1 and obj2 are identical and #f otherwise. eq? identifies equal symbols, integers and chars, but not reals or strings. To compare reals, use eqv? and to compare strings use string=? or equal?. Empty lists, vectors and strings are always eq?.
R4RS Compliance Full
Examples
(eq? 'a 'b) => #f
(eq? 'a 'a) => #t
(eq? 1 1) => #t
(eq? 1.0 1.0) => #f
(eq? '() '()) => #t
(eq? "" "") => #t
(eq? #() #()) => #t

equal?

equal? recognizes objects with the same value.

Category Native procedure
Format (equal? obj1 obj2)
Parameters
obj1any object
obj2any object
Description equal? returns #t if obj1 and obj2 have the same value and #f otherwise. equal? returns #t, if eqv? does, but also if both objects are lists, vectors or strings and contain the same components. In general, two objects are equal? if they print the same way. equal? checks for circular lists.
R4RS Compliance Full
Examples
(equal? 'a 'b) => #f
(equal? 'a 'a) => #t
(equal? 1 1.0) => #t
(equal? '(a (b) c) '(a (b) c)) => #t
(equal? #(a b c) (vector a b c)) => #t
(equal? "abc" "abc") => #t

eqv?

eqv? recognizes equivalent objects.

Category Primitive procedure
Format (eqv? obj1 obj2)
Parameters
obj1any object
obj2any object
Description eq? returns #t if obj1 and obj2 are equivalent and #f otherwise. eqv? returns #t, if eq? does, but also if both objects are numbers and numerically the same. Different non-empty strings are never considered eqv?, as modifying one string does not alter the other and so they're not equivalent. (Remember that strings are not shared in LispMe.)
R4RS Compliance Full
Examples
(eqv? 'a 'b) => #f
(eqv? 'a 'a) => #t
(eqv? 1 1) => #t
(eqv? 1 1.0) => #t
(eqv? '() '()) => #t
(eqv? "" "") => #t
(eqv? "abc" "abc") => #f

error

error aborts the evaluation with an error message.

Category Native procedure
Format (error obj)
Parameters
objany object
Description error aborts the current evaluation and prints obj using display to a message box as a user error. There's no return value.
R4RS Compliance LispMe extension
Examples
(error "Fucked up") => no value, displays Fucked up in a message box
(error '(a b c d)) => no value, displays (a b c d) in a message box

eval

eval evaluates an expression

Category Compiler extension
Format (eval expression)
Parameters
expressionany valid expression
Description eval evaluates expression in the current environment and returns its value.
R4RS Compliance LispMe extension. The environment parameter described in R5RS is not supported.
Examples
(eval '(cons 'foo '())) => (foo)
(let ((a 1)) (eval 'a)) => 1

even?

even? tests, if a number is even.

Category Library procedure
Format (even? int)
Parameters
intan integer
Description even? returns #t, if int is even. Otherwise it returns #f. See also odd?.
R4RS Compliance Full
Examples
(even? 42) => #t
(even? 1.23) => error

event

event gets an user interface event.

Category Primitive procedure
Format (event wait)
Parameters
waitany object interpreted as boolean
Description event gets the next event from the PalmOS event queue and translates it into LispMe event syntax. Depending on wait it will wait (true) for the next event to become available or return immediately (timeout), if no event is queued. See also here.
R4RS Compliance LispMe extension
Examples
(event #t) => (pen-down 80 80), after you tap in the center of the screen
(event #f) => (timeout) when no event has been queued

exact?

exact? tests, if a number is exact.

Category Library procedure
Format (exact? num)
Parameters
numa number
Description exact? always returns #f, as LispMe doesn't support the exactness property of numbers. See also inexact?.
R4RS Compliance Exactness property not supported
Examples
(exact? 42) => #f

exp

exp computes the natural antilogarithm of a number.

Category Primitive procedure (MathLib required)
Format (exp z)
Parameters
zany number
Description exp returns the natural antilogarithm ex of z.
R4RS Compliance Full
Examples
(exp 0) => 1
(exp 100) => 2.68811714181613e+43
(exp 3-i) => 10.8522619141979-16.90139653515i

expt

expt computes the power of two numbers.

Category Library procedure (MathLib required)
Format (expt z1 z2)
Parameters
z1any number
z2any number
Description expt returns the power z1z2.
R4RS Compliance Full
Examples
(expt 2 5) => 32
(expt 1.1 100) => 13780.6123398223
(expt 0 -3) => [inf]
(expt +i +i) => 0.207879576350762

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