CoCoA:IsNumber

From ApCoCoAWiki

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>