COL()

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Function to return screen column position


Syntax

COL()


See Also

PCOL(), PROW(), ROW(), SCOLS(), SET DEVICE, SROWS()


Description

The COL() function returns the current column position of the cursor on the screen. The current cursor position is updated whenever you issue the @...SAY...GET or MENU TO commands. Normal output using other commands does not have an effect. The main use of the COL() function is to calculate relative cursor addressing when designing forms and menus. If you have issued the SET DEVICE TO PRINT command, the printer column position is updated rather than the screen column position, see PCOL() for details.


Example

@1,1
do while col() < 20
    @1, col()+1 say "-"
enddo


Products

Recital