Template:APLFN5: Difference between revisions
From NARS2000
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
< | <apll><pre> {{{top}}} | ||
∇ {{{header}}} | |||
[1] | [1] {{{1}}} | ||
[2] | [2] {{{2}}} | ||
[3] | [3] {{{3}}} | ||
[4] | [4] {{{4}}} | ||
[5] | [5] {{{5}}} | ||
∇ | ∇</pre></apll> | ||
<noinclude> | <noinclude> | ||
This template is used to list an APL function having 5 lines. If this wiki adds the Parserfunction feature, this template will be replaced by a generic one. | This template is used to list an APL function having 5 lines. If this wiki adds the Parserfunction feature, this template will be replaced by a generic one. |
Latest revision as of 23:32, 15 April 2018
{{⊤}} ∇ {{{header}}} [1] {{{1}}} [2] {{{2}}} [3] {{{3}}} [4] {{{4}}} [5] {{{5}}} ∇
This template is used to list an APL function having 5 lines. If this wiki adds the Parserfunction feature, this template will be replaced by a generic one.
This allows you to list the contents of a function without having to include the line numbers and the ∆ prefix and suffix. You just list the header and the 5 lines. Because of the feature for translating apl symbols, you must specify the line values, Like this:
{{APLFN5|top=⎕vr 'Header'
|header=K←Header arg1
|1='Line1'
|2=X←0
|3=rhoresult ← ⍴ X
|4=⍝ one more line
|5=K ←1
}}
And you get:
{{⊤}} ∇ {{{header}}} [1] {{{1}}} [2] {{{2}}} [3] {{{3}}} [4] {{{4}}} [5] {{{5}}} ∇