Terminal control/Cursor movement: Difference between revisions

(Terminal control/Cursor movement in FreeBASIC)
Line 1,250:
/*stick a fork in it, we're done.*/</syntaxhighlight>
 
=={{header|Ruby}}==
{{Works with|Ubuntu|22.04}}
<syntaxhighlight lang="ruby">require 'io/console'
 
def c (method, *args) # to avoid repeating sleeps
STDOUT.send(method, *args)
sleep 1
end
 
x, y = STDOUT.winsize
c(:clear_screen)
c(:cursor_right, 1)
c(:cursor_down, 1)
c(:cursor_left, 1)
c(:cursor_up, 1)
c(:goto_column, y)
c(:goto_column, 0)
c(:goto, 0, y)
c(:goto, x, 0)
</syntaxhighlight>
=={{header|Scala}}==
{{Works with|Ubuntu|14.04}}
1,149

edits