next up previous
Next: The spare command Up: Changes Previous: Optional script arguments

Logical operators

|| and && are now allowed in integer expressions, representing logical or and and. They associate left to right, with precedence below equality testing. This eases coding of optional arguments in scripts, as in

		if #0==3||#0==4 START

== can now be used interchangeably with = for equality testing. == is preferred, and will be the only form allowed in the dot command processor when logical operators are added there, because = is used for assignment. (% cannot replace & for modulo, because it is handled specially as Macaulay's prompt character.)

The complete set of operators for integer expressions are now:

* ** / | || & && ^ ( ) + - > >= < <= = == ! !=



Sorin Popescu
Sun Dec 22 18:20:57 EST 1996