CoCoA:IsNumber

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

IsNumber

checks if the argument is a number

Description

This function returns TRUE if E has type INT, RAT, or ZMOD.

Otherwise, it returns FALSE.

Example

  Use R ::= Q[x,y];
  IsNumber(x+y);
FALSE
-------------------------------
  IsNumber(3);
TRUE
-------------------------------
  IsNumber(3%5);
TRUE
-------------------------------

Syntax

IsNumber(E:OBJECT):BOOL
   <type>boolean</type>
   <type>integer</type>
   <type>rat</type>
   <type>zmod</type>