| PL/i Programming Language for i.CanDoIt |
| This set of pages will provide brief tutorials about programming in PL/i. This language is more simple than C, but more structured than Basic. The objective in creating this language was to compile compact code that would run efficiently and safely as a virtual machine, like a very lean Java. |
 |
| Index of PL/i Tutorials |
|
|
|
|
|
Conditional operators:
|
=
|
Equal
|
|
<>
|
Not equal
|
|
>
|
Greater than
|
|
>=
|
Greater than or equal |
|
<
|
Less than |
|
<=
|
Less than or equal |
|
Logic operators for conditional expressions:
|
and
|
Logical AND, e.g., if (a > b) and (c > d) then ...
|
|
not
|
Logical NOT, e.g., if not (a > b) then ...
which is of course the same as if a <= b then ...
|
|
or
|
Logical OR, e.g., if (a > b) or (c > d) then ...
|
Be sure to use parenthesis to establish precedence as necessary. If you start with this statement:
if (a > b) or (c > d) then
but remove all of the parenthesis, like this:
if a > b or c > d then
it will get interpreted as if you had put parenthesis back like this:
if ((a > b) or c) > d then
This will not yield the same result as the first statement.
|
|
|
|