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 W

wait

wait waits for a time given.

Category Native procedure
Format (wait time)
Parameters
timea positive integer
Description waits waits for time milliseconds. time must be positive or an error results.
R4RS Compliance LispMe extension
Examples
(wait 1000) => #n after waiting 1 second

wait-pen

wait-pen waits for a pen tap and returns its coordinates.

Category Library procedure
Format (wait-pen)
Parameters none
Description wait-pen waits for a pen tap. When the pen event occurs, the pen coordinates are consed into a pair (x . y), which is returned. Both x and y coordinates are in the range [0..160].
R4RS Compliance LispMe extension
Examples
(wait-pen) => (80 . 80) assuming, you tapped exactly into the center of the screen.

while

while executes instructions in a loop.

Category Special form (Compiler extension)
Format (while cond expr1 ...)
Parameters
condan expression
expriexpressions
Description while evaluates the expression cond If this evaluates to true, the expressions expri are evaluated (for effect only) in sequence and the loop starts again. Otherwise, the loop is terminated and #f is returned.
R4RS Compliance LispMe extension
Examples
(let ((a 0))
  (while (< a 5) (write a) (set! a (+ a 1))))
=> #f and prints 0 1 2 3 4

write

write prints an object in machine-readable format.

Category Native procedure
Format (write obj [outport])
Parameters
objany object
outport(optional) an output port
Description write prints an object to the output field or to the output port outport in machine-readable format, i.e. strings and chars are escaped as described here. A space character is appended after each object written. write returns obj. For related information, see display and newline.
R4RS Compliance Full
Examples
(write "Hello, world") => "Hello, world" and prints "Hello, world" to the output area.
(write '((x y))) => "((x y))" and prints ((x y)) to the output area.

write-record

write-record writes a record to an arbitrary Pilot DB.

Category Deprecated use dm-insert-rec or dm-update-rec instead
Format (write-record dbname recnum obj)
Parameters
dbnamea string naming the database
recnuman integer
objeither a string or #f
Description write-record opens the Pilot database named dbname (case-sensitive!). recnum must be a valid index for the database. If obj is a string, a new record (filled with the string's contents) is tried to be inserted into the database at the position recnum and the actual insertion position is returned as an integer.

If obj is the value false, the record with index recnum is (permanently) deleted from the database (using DmRemoveRecord, not just setting the deleted attribute) and #t is returned on success.

If the database or the index doesn't exist or any other error occurs, #f is returned in both cases.

Warning: Don't try to create records for other apps when you're not absolutely sure about their data layout. Those apps often assume valid data in their databases and can crash badly otherwise!

R4RS Compliance LispMe extension.
Examples
(write-record "foo" 9999 "#01#02#03") => 5 and wrote successfully a record containing the 3 bytes "#01#02#03" to the database foo at the last index (which is 5).

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