next up previous contents index
Next: List of primitives Up: Conventions adopted by XLOGO Previous: Case-sensitivity   Contents   Index

Operators and syntax

There are two ways to write certain commands. For example, to add 4 and 7, there are two possibilities: you can either use the primitive somme which expects two arguments: somme 4 7, or you can use the operator +: 4+7. Both have the same effect.
This table shows the relationship between operators and primitives:

sum difference product quotient
+ - * /
or and equal?
| (ALT GR+6) #2723#> =


There are two other operators with no associated primitive:
Note: The two operators | and & are specific to XLOGO. They do not exist in traditional versions of LOGO. Here are some examples of usage:

pr 3+4=7-1 ----> false
pr 3=4 | 7<=49/7 ----> true
pr 3=4 & 7=49/7 ----> false


next up previous contents index
Next: List of primitives Up: Conventions adopted by XLOGO Previous: Case-sensitivity   Contents   Index
Loïc 2008-06-08