EasyManua.ls Logo

Sharp PYTHAGORUS - Page 55

Sharp PYTHAGORUS
92 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
47 | Page
5) IF (IF followed by conditionals).
Used with conditional. If there is an IF command during the
executtion of the program, execute the conditional composed of
the following instructions:

And if true, continue to exeute from the next line.
1 IF condiional:
When the value of the expression is not 0 it is considered true and
executed from the next line.
Ex: 10; IF A > B, GTO 15
11; A + 1 => A
15; A * B => C
A > B GTO line 15
 ignore the next statement, which is the GTO 15
command, and instead execute the following line, in this
case, line 11;
2 IF “variable” (memory):
If you define the IF memory “A”, consider the test true when the
value of A memory is not 0. If true execute from the next
statement , and if false and execute from the next line.

Related product manuals