Israt()

From TinyMUX
Revision as of 00:13, 14 August 2006 by Mark (talk | contribs) (Init page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


{{Function:israt(<string>)}}

This function will return 1 (TRUE) if the argument is a rational and 0 (FALSE) otherwise. Rational by this definition includes many real numbers, but excludes scientific notation and 'special words': NaN, -Inf, +Inf, and Ind.

You can test more restrictively with isint() and more inclusively with isnum().

Example

> say israt(22223.0000)

You say "1"

> say israt(+77)

You say "1"

> say israt(1E20)

You say "0"

Related Topics

BOOLEAN VALUES, isdbref(), isint(), isnum(), isword()