Terminal control/Cursor movement: Difference between revisions

→‎{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details
m (→‎{{header|Kotlin}}: Assumed terminal size is in fact 80 x 24)
(→‎{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details)
Line 464:
=={{header|Kotlin}}==
{{Works with|Ubuntu|14.04}}
<lang scala>// version 1.1.12
 
const val ESC = "\u001B" // escape code
Line 470:
fun main(args: Array<String>) {
print("$ESC[2J") // clear terminal first
print("$ESC[10;10H") // move cursor to (10, 10) say
val aecs = arrayOf(
"[1D", // left