Back to table

Not Operators

The following is a valid µOCCAM program. Test the two types of not (negation) operators.

Program file: /public/cs3/web/ipptests/not_operators.accept
INT y = 5: -- initialise and declare varible, y=5
SEQ
  y := NOT 5 -- y is now -5
  y := -y    -- y is now +5