Defined function (traditional): Difference between revisions

Jump to navigation Jump to search
Line 154: Line 154:


==== Shyness ====
==== Shyness ====
A tradfn can be declared as shy, that is, it exhibits the same behaviour as an assignment, in that by default, no result is printed when the function terminates, but attempting to use the result still succeeds. This declaration is done by putting curly braces around the result name (for example <source lang=apl inline>{result}←left Function right</source>).
By default, functions in APL will print their result to the session log even without using <source lang=apl inline>⎕←</source> unless their results are shy. Shy results are declared by putting curly braces around the result name (for example <source lang=apl inline>{result}←left Function right</source>). Assignment (<source lang=apl inline>name←array</source>) exhibits the same behaviour as a shy function in that, by default, no result is printed when the function terminates, but attempting to use the result still succeeds.


==== Namelists ====
==== Namelists ====

Navigation menu