Top
Back: 4.3.5 boolean expressions
Forward: 4.4 intmat
FastBack: 4. Data types
FastForward: 5. Functions and system variables
Up: 4.3 int
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

4.3.6 boolean operations

and

logical and, may also be written as &&

or

logical or, may also be written as ||

not

logical not, may also be written as !

The precedence of the boolean operations is:

  1. parentheses
  2. comparisons
  3. not
  4. and
  5. or

Example:

 
  (1>2) and 3;
→ 0
  1 > 2 and 3;
→ 0
  ! 0 or 1;
→ 1
  !(0 or 1);
→ 0

Top Back: 4.3.5 boolean expressions Forward: 4.4 intmat FastBack: 4. Data types FastForward: 5. Functions and system variables Up: 4.3 int Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.