Template:APLFN5: Difference between revisions
From NARS2000
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{1}}<br/> | |||
[1] | [1] {{2}}<br/> | ||
[2] {{{3}}}<br/> | [2] {{{3}}}<br/> | ||
[3] {{{4}}}<br/> | [3] {{{4}}}<br/> | ||
Line 17: | Line 17: | ||
|{comment} one more line<br/> | |{comment} one more line<br/> | ||
|K {:=}1}}<br/> | |K {:=}1}}<br/> | ||
Test 1 | |||
{{APLFN5|K{:=}Header arg1 | |||
|'Line1' | |||
|X{:=}0 | |||
|rhoresult {:=} {rho} X | |||
|{comment} one more line | |||
|K {:=}1}} | |||
And you get:<br/> | And you get:<br/> |
Revision as of 04:20, 27 February 2013
Template:1
[1] Template:2
[2] {{{3}}}
[3] {{{4}}}
[4] {{{5}}}
[5] {{{6}}}
∇
</apll>
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. Like this:
{{APLFN5|K←Header arg1
|'Line1'
|X←0
|rhoresult ← ⍴ X
|⍝ one more line
|K ←1}}
Test 1
Template:1
[1] Template:2
[2] {{{3}}}
[3] {{{4}}}
[4] {{{5}}}
[5] {{{6}}}
∇
</apll>
And you get:
∇ K←Header arg1
[1] 'Line1'
[2] X←0
[3] rhoresult ← ⍴ X
[4] ⍝ one more line
[5] K ←1
∇