Defined function (traditional): Difference between revisions

Jump to navigation Jump to search
Line 14: Line 14:
{{Works in|[[Dyalog APL]], [[APL2]], [[GNU APL]], [[NARS2000]], [[APLX]], and every older APL from [[APL\360]]}}
{{Works in|[[Dyalog APL]], [[APL2]], [[GNU APL]], [[NARS2000]], [[APLX]], and every older APL from [[APL\360]]}}
=== Braces ===
=== Braces ===
An [[ambivalent function]] with an optional left argument, a conditional [[control structure]], one local variable, and a [[shy]] result:
An [[ambivalent function]] with an optional left argument, a conditional [[control structure]], one local variable, and a [[#Shyness|shy]] result:
<source lang=apl>
<source lang=apl>
∇ {res}←{left} AddMult2 right;local
∇ {res}←{left} AddMult2 right;local
Line 31: Line 31:
</source>
</source>
{{Works in|[[Dyalog APL]]}}
{{Works in|[[Dyalog APL]]}}
=== Brackets ===
=== Brackets ===
[[GNU APL]] allows functions and operators to accept an [[function axis|axis]] argument:<ref>[https://www.gnu.org/software/apl/apl.html#Section-3_002e2 3.2 Axis argument in defined functions] – GNU APL Manual</ref>
[[GNU APL]] allows functions and operators to accept an [[function axis|axis]] argument:<ref>[https://www.gnu.org/software/apl/apl.html#Section-3_002e2 3.2 Axis argument in defined functions] – GNU APL Manual</ref>

Navigation menu