APL Wiki:About: Difference between revisions
Jump to navigation
Jump to search
→Contributing
Miraheze>Adám Brudzewsky |
Miraheze>Adám Brudzewsky |
||
Line 18: | Line 18: | ||
Inline code is used for single primitives and short expressions and uses the format | Inline code is used for single primitives and short expressions and uses the format | ||
<blockquote><pre> | <blockquote><pre><source lang=apl inline>(2=+⌿0=N∘.|N)/N←⍳100</source></pre></blockquote> | ||
which results in | which results in | ||
<blockquote> | <blockquote><source lang=apl inline>(2=+⌿0=N∘.|N)/N←⍳100</source></blockquote> | ||
=== APL code blocks === | === APL code blocks === | ||
Line 26: | Line 26: | ||
For session transcripts, function definitions and lorger expressions, use code blocks like | For session transcripts, function definitions and lorger expressions, use code blocks like | ||
<blockquote><pre> | <blockquote><pre><source lang=apl> | ||
<source lang=apl> | |||
(2=+⌿0=N∘.|N)/N←⍳100 | (2=+⌿0=N∘.|N)/N←⍳100 | ||
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | ||
</source> | </source></pre></blockquote> | ||
which results in | which results in | ||
<blockquote> | <blockquote><source lang=apl> | ||
<source lang=apl> | |||
(2=+⌿0=N∘.|N)/N←⍳100 | (2=+⌿0=N∘.|N)/N←⍳100 | ||
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | ||
</source> | </source></blockquote> | ||
Optionally, you can indicate one or more APL dialects which are able to run the code by using a special template immediately after the source tag, like | Optionally, you can indicate one or more APL dialects which are able to run the code by using a special template immediately after the source tag, like | ||
<blockquote><pre> | <blockquote><pre><source lang=apl> | ||
<source lang=apl> | |||
{(2=+⌿0=⍵∘.|⍵)/⍵}⍳100 | {(2=+⌿0=⍵∘.|⍵)/⍵}⍳100 | ||
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | ||
</source> | </source> | ||
{{Works in|[[Dyalog APL]], [[dzaima/APL]], [[GNU APL]], [[ngn/APL]]}} | {{Works in|[[Dyalog APL]], [[dzaima/APL]], [[GNU APL]], [[ngn/APL]]}}</pre></blockquote> | ||
which results in | which results in | ||
<blockquote> | <blockquote><source lang=apl> | ||
<source lang=apl> | |||
{(2=+⌿0=⍵∘.|⍵)/⍵}⍳100 | {(2=+⌿0=⍵∘.|⍵)/⍵}⍳100 | ||
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | ||
</source> | </source> | ||
{{Works in|[[Dyalog APL]], [[dzaima/APL]], [[GNU APL]], [[ngn/APL]]}} | {{Works in|[[Dyalog APL]], [[dzaima/APL]], [[GNU APL]], [[ngn/APL]]}}</blockquote> | ||
You can also include a link to [[TryAPL]] or [[Try It Online]] right before the source tag, for example | You can also include a link to [[TryAPL]] or [[Try It Online]] right before the source tag, for example | ||
<blockquote><pre> | <blockquote><pre>[https://tryapl.org/?a=%7B%282%3D+%u233F0%3D%u2375%u2218.%7C%u2375%29/%u2375%7D%u2373100&run Try it now!] | ||
[https://tryapl.org/?a=%7B%282%3D+%u233F0%3D%u2375%u2218.%7C%u2375%29/%u2375%7D%u2373100&run Try it now!] | |||
<source lang=apl> | <source lang=apl> | ||
{(2=+⌿0=⍵∘.|⍵)/⍵}⍳100 | {(2=+⌿0=⍵∘.|⍵)/⍵}⍳100 | ||
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | ||
</source> | </source></pre></blockquote> | ||
which results in: | which results in: | ||
<blockquote> | <blockquote>[https://tryapl.org/?a=%7B%282%3D+%u233F0%3D%u2375%u2218.%7C%u2375%29/%u2375%7D%u2373100&run Try it now!] | ||
[https://tryapl.org/?a=%7B%282%3D+%u233F0%3D%u2375%u2218.%7C%u2375%29/%u2375%7D%u2373100&run Try it now!] | |||
<source lang=apl> | <source lang=apl> | ||
{(2=+⌿0=⍵∘.|⍵)/⍵}⍳100 | {(2=+⌿0=⍵∘.|⍵)/⍵}⍳100 | ||
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 | ||
</source> | </source></blockquote> | ||
Just make sure to leave a blank line before the link. | |||
=== Primitives and other built-ins === | === Primitives and other built-ins === |