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 T

tan

tan computes the tangent of a number.

Category Primitive procedure (MathLib required)
Format (tan z)
Parameters
zany number
Description tan computes the tangent of the number z. z is an angle measured in radians.

For complex arguments z = x + yi, the formula

tan z = sin 2x / (cos 2x + cosh 2y) + i sinh 2x / (cos 2x + cosh 2y)
is used.
R4RS Compliance Full
Examples
(tan 0) => 0
(tan 1) => 1.5574077246549
(tan 0.5+2i) => 0.0302159873228775+0.979940849961738i

tanh

tanh computes the hyperbolic tangent of a number.

Category Primitive procedure (MathLib required)
Format (tanh z)
Parameters
zany number
Description tanh computes the hyperbolic tangent of the number z.

For complex arguments z = x + yi, the formula

tanh z = sinh 2x / (cosh 2x + cos 2y) + i sin 2x / (cosh 2x + cos 2y)
is used.
R4RS Compliance LispMe extension
Examples
(tanh 0) => 0
(tanh 1) => 0.761594155955765
(tanh 0.5+2i) => 1.32128658377119-0.850878121144937i

text

text prints an object as graphic text.

Category Native procedure
Format (text obj)
Parameters
objany object
Description text formats obj in human-readable format and prints it as graphic text to the graphic screen. Printing uses the graphics state *gstate* for starting coordinates, font, colors and drawing mode. The current point in *gstate* is not updated.

See here for details on the graphic state. The return value is #n to avoid trashing the graphics.

R4RS Compliance LispMe extension
Examples
(text "Hello, world") => #n and prints Hello, world as described above.

ticks?

ticks? recognizes ticks.

Category Primitive procedure
Format (ticks? obj)
Parameters
objany object
Description ticks? returns #t for a "ticks" value and #f for any other object.
R4RS Compliance LispMe extension
Examples
(ticks? (current-ticks)) => #t
(ticks? (current-ts)) => #f

ticks-per-sec

ticks-per-sec returns the number of ticks in a second.

Category Native procedure
Format (ticks-per-sec)
Parameters None
Description ticks-per-sec returns the number of ticks in a second (typically 100, but don't take this value for granted!). Always use this function to scale the results from ticks measuring functions.
R4RS Compliance LispMe extension
Examples
(ticks-per-sec) => 100 (typically)

ticks-since

ticks-since returns the number of ticks elapsed.

Category Native procedure
Format (ticks-since ticks)
Parameters
ticksa "ticks" value
Description ticks-since returns the number of ticks elapsed since ticks. Ticks are the smallest measurable units of time in PalmOS. There are (ticks-per-sec) ticks in a second.
R4RS Compliance LispMe extension
Examples
(ticks-since (current-ticks)) => 0 LispMe should be fast enough :-)

time?

time? recognizes times.

Category Primitive procedure
Format (time? obj)
Parameters
objany object
Description time? returns #t for a time value and #f for any other object.
R4RS Compliance LispMe extension
Examples
(time? "18:40") => #f
(time? (make-time 9 37)) => #t
(time? (current-ts)) => #f

time-hour

time-hour extracts the hour from a time.

Category Native procedure
Format (time-hour time)
Parameters
timea time
Description time-hour returns the hour part of a time value as an integer value in the range 0..23. Note that PalmOS time values don't include seconds, so there is no time-second function.
R4RS Compliance LispMe extension
Examples
(time-hour (make-time 18 40)) => 18

time-minute

time-hour extracts the hour from a time.

Category Native procedure
Format (time-minute time)
Parameters
timea time
Description time-minute returns the minute part of a time value as an integer value in the range 0..59. Note that PalmOS time values don't include seconds, so there is no time-second function.
R4RS Compliance LispMe extension
Examples
(time-minute (make-time 18 40)) => 40

timeout

timeout is posted when no event has arrived in time.

Category UI event
Format (timeout)
Parameters None
Description timeout is the event posted when the maximum waiting time for an event has passed and no other event has arrived yet. The waiting time can be specified in a call to frm-popup or frm-goto.

The PalmOS API documentation calls this event nilEvent, but I think this name is unfortunate in a Lispish context :-)

truncate

truncate computes the integer component of a number.

Category Primitive procedure (MathLib required)
Format (truncate num)
Parameters
numa number
Description truncate converts num to a floating point number and returns the integer part of it. The result is not a LispMe integer, it's a floating point value.

See also ceiling, floor, integer, and round.

R4RS Compliance Full
Examples
(truncate -4.3) => -4
(truncate 3.5) => 3

ts->date

ts->date extracts the date parts from a timestamp.

Category Native procedure
Format (ts->date ts)
Parameters
tsa timestamp
Description ts->date returns the date part of a timestamp value as a date value (foreign value).
R4RS Compliance LispMe extension
Examples
(ts->date (make-ts 1234567890)) => [date 13. Feb 1943]

ts->number

ts->number extracts the second count from a timestamp.

Category Native procedure
Format (ts->number ts)
Parameters
tsa timestamp
Description ts->number returns the seconds part of a timestamp value as an integer. This is the number of seconds elapsed since January 1st 1904, midnight.
R4RS Compliance LispMe extension
Examples
(ts->number (current-ts)) => 3077406912

ts->time

ts->time extracts the time parts from a timestamp.

Category Native procedure
Format (ts->time ts)
Parameters
tsa timestamp
Description ts->time returns the time part of a timestamp value as a time value (foreign value). Note that a PalmOS time value doesn't include seconds, so you may have to use ts->second to achieve precision to a second.
R4RS Compliance LispMe extension
Examples
(ts->time (make-ts 1234567890)) => [time 11.31 pm]

ts-second

ts-second extracts the seconds from a timestamp.

Category Native procedure
Format (ts-second ts)
Parameters
tsa timestamp
Description ts-second returns the seconds part of a timestamp value as an integer value in the range 0..59. To extract other parts of a timestamp, use ts->date and ts->time and the corresponding extraction functions for date and time.
R4RS Compliance LispMe extension
Examples
(ts-second (make-ts 1234567890)) => 30

ts?

ts? recognizes timestamps.

Category Primitive procedure
Format (ts? obj)
Parameters
objany object
Description ts? returns #t for a timestamp and #f for any other object.
R4RS Compliance LispMe extension
Examples
(ts? (current-ts)) => #t
(ts? 123456789) => #f

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