A function returning the vertical cursor position. The top of the screen is line 0.
Y=VPOS
You can use VPOS in conjunction with POS to return to the present position on the screen after printing a message somewhere else. The example below is a procedure for printing a 'status' message at line 7. The cursor is returned to its previous position after the message has been printed.
1000 DEF PROC_message(message$) 1010 LOCAL x,y 1020 x=POS 1030 y=VPOS 1040 PRINT TAB(0,7) CHR$(7);message$; 1050 PRINT TAB(x,y); 1060 ENDPROC
Syntax
<n-var>=VPOS