Template:APLFN5: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<big><code> ∇ {{{header}}}<br /> | <b><big><code> {{{top}}}<br /> | ||
∇ {{{header}}}<br /> | |||
[1] {{{1}}}<br /> | [1] {{{1}}}<br /> | ||
[2] {{{2}}}<br /> | [2] {{{2}}}<br /> | ||
Line 5: | Line 6: | ||
[4] {{{4}}}<br /> | [4] {{{4}}}<br /> | ||
[5] {{{5}}}<br /> | [5] {{{5}}}<br /> | ||
∇ <br /></code></big> | ∇ <br /></code></big></b> | ||
<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. | ||
Line 11: | Line 12: | ||
This allows you to list the contents of a function without having to include the line numbers and the {delta} 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: | This allows you to list the contents of a function without having to include the line numbers and the {delta} 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: | ||
<nowiki>{</nowiki>{APLFN5|header=K{:=}Header arg1<br/> | <nowiki>{</nowiki>{APLFN5|top={quad}vr 'Header' | ||
|header=K{:=}Header arg1<br/> | |||
|1='Line1'<br/> | |1='Line1'<br/> | ||
|2=X{:=}0<br/> | |2=X{:=}0<br/> | ||
Line 21: | Line 23: | ||
And you get:<br/> | And you get:<br/> | ||
{{APLFN5|header=K{:=}Header arg1 | {{APLFN5|top={quad}vr 'Header' | ||
|1='Line1' | |header=K{:=}Header arg1<br/> | ||
|2=X{:=}0 | |1='Line1'<br/> | ||
|3=rhoresult {:=} {rho} X | |2=X{:=}0<br/> | ||
|4={comment} one more line | |3=rhoresult {:=} {rho} X<br/> | ||
|4={comment} one more line<br/> | |||
|5=K {:=}1}} | |5=K {:=}1}} | ||
</noinclude> | </noinclude> |
Revision as of 13:25, 27 February 2013
{{⊤}}
∇ {{{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:
⎕vr 'Header'
∇ K←Header arg1
[1] 'Line1'
[2] X←0
[3] rhoresult ← ⍴ X
[4] ⍝ one more line
[5] K ←1
∇