Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - col() return the current cursor column position http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 col()               Return the current cursor column position
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   func uint col extern

 Arguments
   None.

 Return
   Column position of the cursor.

 Description
   The col() function returns the current screen cursor column position. The
   column position is zero based. That is, the upper left hand corner of the
   screen is row 0, column 0.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_col
   // print text relative to a starting position.
   @ row(), col() + 12 ?? "Result: ---> "
   
   /*
   Row and column positions are zero based. That is, the upper left hand
   corner of the screen is position 0,0.
   */
   @ 0, 0
   ? col()                    // prints 0
   endproc

   proc main
   Test_col()
   endproc

See Also: getrc() pcol() prow() restrc() row() row() saverc() setrc()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson