Subleq: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
(Added BASIC25, Gambas6 and Yabasic. Moved FreeBASIC to section BASIC) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1,202:
{{works with|GW-BASIC}}
{{works with|QBasic}}
<syntaxhighlight lang="
20 INPUT "Filename";F$
30 OPEN "I",1,F$
Line 1,335:
End</syntaxhighlight>
==={{header|GW-BASIC}}===
The [[#BASIC|BASIC]] solution works without any changes.
==={{header|QBasic}}===
The [[#BASIC|BASIC]] solution works without any changes.
==={{header|Yabasic}}===
Line 3,357 ⟶ 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,374 ⟶ 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,850 ⟶ 3,858:
=={{header|Wren}}==
{{trans|Kotlin}}
<syntaxhighlight lang="
var subleq = Fn.new { |program|
|