Owner's Manual
53
The FOR ... NEXT statement repeats a task a set number of times without having to rewrite
it. All statements between the FOR and NEXT command are repeated based on the initial
value, the final value and the step size. If the STEP portion of the command is not used,
it is assumed to be 1.
Example:
60 FOR ITEMS=1 TO 20
70 INPUT PRICE
80 SUM=PRICE+SUM
90 NEXT ITEMS
FUNCTIONS
A function is a mathematical procedure which when applied to a certain value will give
a new value. We call the value in brackets ( ), the argument and the new value the result.
Example: SQR is the square root function. So if we type PRINT SQR (9) (press Enter)
we will get the answer 3.
Example:
Y=9 : X=SQR(Y) : PRINT X press Enter
We will get the answer 3.
In these two examples 9 is the argument, SQR is the function and 3 is the result.