FANDOM


Syntax

OUTPUT object

OP object

Explanation

OUTPUT makes its input the output of the procedure. OUTPUT can only be used within a procedure. After the object of OUTPUT is run, control returns to the calling procedure or to toplevel.

Example

HYPOT calculates the hypotenuse of an isosceles right triangle with the Pythagorean Theorem (C*C = A*A + B*B) and uses OUTPUT to send that value to the ISOS procedure.

TO HYPOT :SIDE

OUTPUT SQRT (2 * (:SIDE * :SIDE))

END

TO ISOS :SIDE

FD :SIDE
RT 90
FD :SIDE
RT 135
FD HYPOT :SIDE
RT 135

END

? ISOS 30
Pc logo 36

This is the result of the procedure.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.