Subleq: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
mNo edit summary |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(One intermediate revision by one other user not shown) | |||
Line 3,363:
=={{header|RPL}}==
{{works with|HP|
«
» '<span style="color:blue">PEEKind</span>' STO <span style="color:grey">@ ''( n → Ram[Ram[←ptr + n]] )''</span>
« { } + RDM▼
'''WHILE''' ptr 0 ≥ '''REPEAT'''▼
« 0 "" → ←ptr stdout
▲ « { } + RDM 'Ram' STO
'''CASE'''
'stdout'
2 <span style="color:blue">PEEKind</span> 1 <span style="color:blue">PEEKind</span> -
0 ≤ '''THEN'''
1 SF '''END'''
Line 3,380 ⟶ 3,382:
'''END'''
'''IF''' 1 FS? '''THEN'''
'''ELSE'''
3 '
'''END'''
'''END'''
stdout
» » '<span style="color:blue">SUBLEQ</span>' STO <span style="color:grey">@ ''( [ program ] mem_size → stdout ] )''</span>
[ 15 17 -1 17 -1 -1 16 1 -1 16 3 -1 15 15 0 0 -1 72 101 108 108 111 44 32 119 111 114 108 100 33 10 0 ] 256 <span style="color:blue">SUBLEQ</span>
Line 3,856 ⟶ 3,858:
=={{header|Wren}}==
{{trans|Kotlin}}
<syntaxhighlight lang="
var subleq = Fn.new { |program|
|