Terminal control/Cursor positioning: Difference between revisions

Dialects 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|BaConBASIC}}==
==={{header|BBCApplesoft BASIC}}===
<syntaxhighlight lang="ns-hubasicapplesoft basic"> 10 LOCATE 3,VTAB 6: HTAB 3
20 PRINT "HELLO"</syntaxhighlight>
 
==={{header|FreeBASICBaCon}}===
<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|ApplesoftCommodore BASIC}}===
<syntaxhighlight lang="applesoft basic"> 10100 print VTABchr$(19) 6:rem change to HTABlowercase 3set
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>
 
==={{header|PureBasicFreeBASIC}}===
<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>
 
==={{header|Commodore BASICPureBasic}}===
<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}}===
<syntaxhighlight lang="basic"> 100 print chr$(19) :rem change to lowercase set
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}}==
511

edits