Execute Brain****/TI-89 BASIC: Difference between revisions
m
Fixed syntax highlighting.
(add TI-89 BASIC as translation of TI-83) |
m (Fixed syntax highlighting.) |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 1:
{{trans
This implementation (in [[TI-89 BASIC]]) is basically a direct translation of the [[RCBF/TI-83 BASIC
IO is performed with numbers; character IO could be done (using char() and ord() to convert) but the TI-89 has no cursor for user program IO, so it would be necessary to either implement one or buffer output until the program exits or waits for input, in order to display more than one character per line.
<
Local valid, raw, BFprog, inst, memory, ip, brackets, memp
"+-.,[]<>" → valid
Line 55:
While ip≥0 and brackets ≠ 0
If mid(BFprog,ip,1) = "[" Then
brackets-1 → brackets▼
ElseIf mid(BFprog,ip,1) = "]" Then▼
brackets+1 → brackets
▲ ElseIf mid(BFprog,ip,1) = "]" Then
▲ brackets-1 → brackets
EndIf
ip-1 → ip
Line 73:
EndIf
EndFor
EndPrgm</
|