Skip to content

POS

Syntax

POS (I)

Description

Returns the current cursor position. The leftmost position is 1. I is a dummy argument.

Example

10 PRINT "Hello";
20 PRINT " Position:"; POS(0)
30 IF POS(0) > 60 THEN PRINT CHR$(13)  ' New line if past column 60
RUN
Hello Position: 7
Ok

See Also

  • LPOS - Returns the current position within the line printer buffer
  • TAB - Move to specific column position in PRINT
  • SPC - Print spaces in PRINT statement
  • PRINT - Output to screen
  • WIDTH - Set output line width