Execute SNUSP: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: added syntax colouring, marked p2js compatible) |
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
||
Line 6:
=={{header|11l}}==
{{trans|Python}}
<
/++++!/===========?\>++.>+.+++++++..+++\
\+++\ | /+>+++++++>/ /++++++++++<<.++>./
Line 58:
step()
snusp(5, HW)</
{{out}}
<pre>
Line 98:
=={{header|Icon}} and {{header|Unicon}}==
<
# snusp.icn, A Modular SNUSP interpreter
#
Line 284:
write()
}
end</
{{out}}
Line 293:
=={{header|J}}==
This program places no limits on the program or data size. Perhaps I'll revisit and write a tacit version of the SNUSP interpreter.
<syntaxhighlight lang="j">
Note 'snusp'
Line 347:
end.
)
</syntaxhighlight>
Store <
\ +++++++++++++++++++++++++++++++++++++\
! /+++++++++++++++++++++++++++++++++++++/
/ \..<+++++\
\ . +++++/
</
<pre>
load'snusp.ijs' NB. the j code above
Line 373:
=={{header|Julia}}==
This Modular SNUSP interpreter uses modular calls to echo the first 2 characters entered. Try typing "Hi" at the prompt.
<
/==!/======ECHO==,==.==#
| |
Line 427:
end
snusp(100, echo2)</
> Hi
Hi
Line 435:
=={{header|Kotlin}}==
{{trans|Go}}
<
// requires 5 chars (10 bytes) of data store
Line 497:
fun main(args: Array<String>) {
snusp(5, hw)
}</
{{out}}
Line 512:
=={{header|Nim}}==
{{trans|Python}}
<
# Requires 5 bytes of data store.
Line 571:
when isMainModule:
snusp(5, Hw)</
{{out}}
Line 584:
=={{header|Phix}}==
{{trans|Go}}
<!--<
<span style="color: #008080;">with</span> <span style="color: #008080;">javascript_semantics</span>
<span style="color: #004080;">integer</span> <span style="color: #000000;">id</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">0</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">ipr</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">1</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">ipc</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">1</span>
Line 646:
<span style="color: #000000;">snusp</span><span style="color: #0000FF;">(</span><span style="color: #000000;">5</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">hw</span><span style="color: #0000FF;">)</span>
<!--</
{{out}}
<pre>
Line 657:
=={{header|Python}}==
{{trans|Go}}
<
HW = r'''
Line 711:
if __name__ == '__main__':
snusp(5, HW)</
{{out}}
<pre>
Line 724:
{{works with|Rakudo|2017.02}}
Implementation of modular SNUSP.
<syntaxhighlight lang="raku"
has @!inst-pointer;
Line 794:
my $snusp = SNUSP.new;
$snusp.run($hw)</
{{out}}
<pre>Hello World!</pre>
Line 804:
The interpreter below implements Core SNUSP:
<
const proc: snusp (in string: sourceCode, in integer: memSize, inout file: input, inout file: output) is func
Line 864:
begin
snusp(helloWorld, 5, IN, OUT);
end func;</
{{out}}
Line 876:
=={{header|Wren}}==
{{trans|Go}}
<
// 'raw' is a multi-line string
Line 949:
"$+++/ | \\+++++++++>\\ \\+++++.>.+++.-----\\\n" +
" \\==-<<<<+>+++/ /=.>.+>.--------.-/"
snusp.call(5, hw)</
{{out}}
|