Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
TERMHEIGHT Function
TERMHEIGHT

Returns the height of the current terminal, measured in character rows.


Examples

PRINT "Terminal height = "; TERMHEIGHT
REM Draw a border along the bottom of the screen
CURSOR 1, TERMHEIGHT
PRINT STRING$(TERMWIDTH, "-")
REM Centre text vertically
midY = TERMHEIGHT / 2
CURSOR 1, midY
PRINT "Hello, world!"

Notes

  • Value is returned as an integer ≥ 1.
  • Useful for positioning with CURSOR.
  • Works together with TERMWIDTH to adapt output to the current terminal size.

See also: TERMWIDTH · CURSOR · CURRENTX · CURRENTY