Terminal control/Cursor positioning: Difference between revisions
Terminal control/Cursor positioning (view source)
Revision as of 23:44, 29 October 2022
, 1 year agoDialects of BASIC moved to the BASIC section.
(Dialects of BASIC moved to the BASIC section.) |
|||
Line 185:
<syntaxhighlight lang="axe">Output(2,5,"HELLO")</syntaxhighlight>
=={{header|
20 PRINT "HELLO"</syntaxhighlight>▼
<syntaxhighlight lang="freebasic">' Cursor positioning, requires ANSI compliant terminal
GOTOXY 3,6
Line 191 ⟶ 196:
The X Y in <code>GOTOXY</code> is Column Row order.
==={{header|BBC BASIC}}===
<syntaxhighlight lang="bbcbasic">PRINT TAB(2,5);"Hello"</syntaxhighlight>▼
==={{header|
<syntaxhighlight lang="
110 print chr$(14) :rem go to position 1,1▼
▲ 20 PRINT "HELLO"</syntaxhighlight>
120 print:print:print:print▼
130 print tab(2) "Hello" </syntaxhighlight>▼
<syntaxhighlight lang="freebasic">Locate 6, 3 : Print "Hello"▼
Sleep</syntaxhighlight>▼
==={{header|IS-BASIC}}===
<syntaxhighlight lang="is-basic">100 PRINT AT 6,3:"Hello"</syntaxhighlight>
==={{header|Liberty BASIC}}===▼
<syntaxhighlight lang="lb">locate 3, 6▼
print "Hello" ▼
</syntaxhighlight>▼
==={{header|Locomotive Basic}}===
<syntaxhighlight lang="locobasic"> 10 LOCATE 3,6
20 PRINT "Hello"</syntaxhighlight>
==={{header|NS-HUBASIC}}===▼
<syntaxhighlight lang="basic">10 LOCATE 3,6
20 PRINT "HELLO"</syntaxhighlight>▼
<syntaxhighlight lang="purebasic">EnableGraphicalConsole(#True)▼
ConsoleLocate(3,6)▼
Print("Hello")</syntaxhighlight>▼
==={{header|ZX Spectrum Basic}}===
Line 208 ⟶ 234:
20 REM So we subtract one from the coordinates
30 PRINT AT 5,2 "Hello"</syntaxhighlight>
▲==={{header|BBC BASIC}}===
▲<syntaxhighlight lang="bbcbasic">PRINT TAB(2,5);"Hello"</syntaxhighlight>
▲==={{header|Commodore BASIC}}===
▲ 110 print chr$(14) :rem go to position 1,1
▲ 120 print:print:print:print
▲ 130 print tab(2) "Hello" </syntaxhighlight>
=={{header|Befunge}}==
Line 344 ⟶ 361:
q = WriteConsole(hConsole, loc("Hello"), 5, NULL, NULL)
end program</syntaxhighlight>
▲=={{header|FreeBASIC}}==
▲<syntaxhighlight lang="freebasic">Locate 6, 3 : Print "Hello"
▲Sleep</syntaxhighlight>
=={{header|Go}}==
Line 444 ⟶ 455:
stdout( #esc + '[6;3HHello')</syntaxhighlight>
▲=={{header|Liberty BASIC}}==
▲<syntaxhighlight lang="lb">locate 3, 6
▲print "Hello"
▲ </syntaxhighlight>
=={{header|Logo}}==
Line 466 ⟶ 472:
setCursorPos(3, 6)
echo "Hello"</syntaxhighlight>
▲=={{header|NS-HUBASIC}}==
▲<syntaxhighlight lang="ns-hubasic">10 LOCATE 3,6
▲20 PRINT "HELLO"</syntaxhighlight>
=={{header|OCaml}}==
Using the library [http://forge.ocamlcore.org/projects/ansiterminal/ ANSITerminal]:
<syntaxhighlight lang="ocaml">#load "unix.cma"
#directory "+ANSITerminal"
Line 535:
<syntaxhighlight lang="powershell">[Console]::SetCursorPosition(2,5)
[Console]::Write('Hello')</syntaxhighlight>
▲=={{header|PureBasic}}==
▲<syntaxhighlight lang="purebasic">EnableGraphicalConsole(#True)
▲ConsoleLocate(3,6)
▲Print("Hello")</syntaxhighlight>
=={{header|Python}}==
Line 770 ⟶ 765:
inc hl ;next char
jr PrintString</syntaxhighlight>
=={{header|zkl}}==
|