up previous next
AsINT

convert into an INT

Syntax
AsINT(N: INT): INT
AsINT(N: RAT): INT
AsINT(N: RINGELEM): INT

Description
If the argument is an integer value this function returns this value as an INT, otherwise it throws an error.

Example
/**/  Use P ::= QQ[x,y];
/**/  type(LC(3*x-y));
RINGELEM
/**/ type(AsINT(LC(3*x-y)));
INT
-- /**/ type(AsINT(LC((3/2)*x-y)));  --> !!! ERROR !!! as expected

See Also