Function MaxCol() Foundation

Determines the maximum (rightmost) visible screen column on the screen or in a window.

Syntax
MaxCol() --> nMaxCol
Return

MaxCol() returns an integer numeric value which is the position of the furthest right visible column on the screen or in a window.

Description

The screen function MaxCol() determines the maximum number of visible columns in which characters can be displayed on the screen or in a window. The numbering of columns begins with zero and ends with MaxCol().

Examples
MaxCol()
// In this example, column positions are displayed 
// at the current row. 

PROCEDURE Main 
   LOCAL n 
   CLS 

   FOR n:=0 TO MaxCol() 
      IF n % 10 == 0 
         @ Row(), Col() SAY Str(n/10,1) COLOR "W+/BG" 
      ELSE 
         @ Row(), Col() SAY Str(n%10,1) COLOR "N/BG" 
      ENDIF 
   NEXT 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.