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 - pcol() return the current column position of the printer http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pcol()              Return the current column position of the printer
------------------------------------------------------------------------------
 Declaration
   printer.hdr

 Syntax
   func uint pcol extern

 Arguments
   None.

 Return
   The current column position of the printer.

 Description
   The pcol() function returns the current column position of the printer.

 Example
   #define EXAMPLE_IO
   #include example.hdr

   proc PrintPos
   para value uint uColReq
   // Preprinted forms have exact positions to place the print head. This
   // procedure moves the print head to the required column position.
   vardef
      uint nCol
   enddef
   nCol := pcol()
   ? space( uColReq - nCol )
   endproc
   
   proc Test_pcol
   // add printer initialization code here
   if pcol() >= 30
      ? chr( 13 )     // control the printer column position
   endif
   ? "Test text"
   PrintPos( 30 )
   ? "Another text"
   endproc

   proc main
   Test_pcol()
   endproc

See Also: __pcol prow()

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