Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function sbcols() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION SBCOLS()

  Short:
  ------
  SBCOLS() Determine number of columns in a box

  Returns:
  --------
  <nCols> => columns in the box

  Syntax:
  -------
  SBCOLS(nLeft,nRight,[lIncludeFrame])

  Description:
  ------------
  The number of columns of a box with left of <nLeft>
  and right of <nRight> is returned. By default, the frame is
  included (the left and the right)

  [lIncludeFrame] by default is True - and all columns
  are counted. If passed as False, only the inside columns are
  counted.

  Examples:
  ---------
   // this example fills a box with "X"'s

   nRows := SBROWS(nTop,nBottom,.f.)
   nCols := SBCOLS(nLeft,nRight,.f.)
   for i = nTop to nRows
     @nTop+i,nLeft say repl("X",nCols)
   next

  Source:
  -------
  S_BOXES.PRG


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