Terminal control/Cursor positioning: Difference between revisions

Go solution
(→‎{{header|Perl 5}}: "Perl", not "Perl 5")
(Go solution)
Line 102:
=={{header|Forth}}==
<lang forth>2 5 at-xy ." Hello"</lang>
 
=={{header|Go}}==
===External command===
<lang go>package main
 
import (
"bytes"
"fmt"
"os"
"os/exec"
)
 
func main() {
cmd := exec.Command("tput", "-S")
cmd.Stdin = bytes.NewBufferString("clear\ncup 5 2")
cmd.Stdout = os.Stdout
cmd.Run()
fmt.Println("Hello")
}</lang>
===ANSI escape codes===
<lang go>package main
 
import "fmt"
 
func main() {
fmt.Println("\033[2J\033[6;3HHello")
}</lang>
===Ncurses===
<lang go>package main
 
import (
"log"
 
gc "code.google.com/p/goncurses"
)
 
func main() {
s, err := gc.Init()
if err != nil {
log.Fatal("init:", err)
}
defer gc.End()
s.Move(5, 2)
s.Println("Hello")
s.GetChar()
}</lang>
 
=={{header|J}}==
Using terminal positioning verbs of [[Terminal_control/Coloured_text#J]]
<lang J>'Hello',~move 6 3</lang>
 
 
=={{header|Lasso}}==
1,707

edits