Top
Back: int declarations
Forward: int operations
FastBack: ideal
FastForward: intmat
Up: int
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.5.2 int expressions

An int expression is:

  1. a sequence of digits (if the number represented by this sequence is too large to fit into the range of integers it is automatically converted to the type number, if a basering is defined)
  2. an identifier of type int
  3. a function returning int
  4. an expression involving ints and the arithmetic operations +, -, *, div (/), % (mod), or ^
  5. a boolean expression
  6. a type cast to int

Note: Variables of type int represent the compiler integers and are, therefore, limited in their range (see Limitations). If this range is too small the expression must be converted to the type number over a ring with characteristic 0.


Example:
 

See Type conversion and casting; number.


Top Back: int declarations Forward: int operations FastBack: ideal FastForward: intmat Up: int Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-1-6, Dec 2012, generated by texi2html.