10.4.2.4. CALL
10.4.2.4. CALL
Explanation | Calling the assigned program. When END statement is given, data returns to the next row of the called CALL statement. | |||
Grammar | CALL <program number>...... END | |||
Parameter | Program number | Arithmetic formula. Program number to call. | 1~999 | |
Example | Distance calculation between ‘P4 and P7. | |||
P300=P4 P301=P7 CALL 902 ‘Result output
PRINT #0, "Dist = "; V300! | REM --- subprog. 902 -------------------------------------- REM V300! = <distance between P300 and P301> REM ------------------------------------------------------------ V300! = (P300.X-P301.X)^2 + (P300.Y-P301.Y)^2 + (P300.Z-P301.Z)^2 V300! = SQR(V300!) | |||