Search                        Top                                  Index
HELP ISDECIMAL                                      Steven Hardy, January 78

    isdecimal(<number>) -> <boolean>

ISDECIMAL is a recogniser procedure for decimal numbers. It returns <true> if
(if and only if) its argument is a decimal number, for example:

    isdecimal(3.4) =>
    ** <true>

    isdecimal(sqrt(10)) =>
    ** <true>

    isdecimal(3) =>
    ** <false>

ISDECIMAL could be defined thus:

    define isdecimal(obj);
        dataword(obj) = "decimal" or dataword(obj) = "ddecimal"
    enddefine;

Notice that ISDECIMAL recognizes double precision decimals as well as single
precision ones.

See REF *NUMBERS for details of numbers and mathematical operations
available in POP-11.

See also HELP
    *DECIMALS - for the distinction between integers, decimals and ddecimals
    *MATH     - for a summary of mathematical operations in POP-11

--- C.all/help/isdecimal -----------------------------------------------
--- Copyright University of Sussex 1987. All rights reserved. ----------