SP Misc/Other Functions

 ISPART()       Determines if a value is part of a set
 CURD()         Return current drive letter
 SBROWS()       Determine number of rows in a box
 ISPRN()        Detects printer ready (or not) on LPT1, 2 or 3
 SBCENTER()     Centers box coordinates
 SBCOLS()       Determine number of columns in a box
 EVALQ()        Evaluates a logical condition in a string
 ENDSWITH()     Determines if a string ends with another string
 PRNTFRML()     Prints a formletter created by formletr()
 CDIR()         Change Directory
 VARLEN()       Returns length of a variable  of any type

SP_SBROWS

SBROWS()

  Short:
  ------
  SBROWS() Determine number of rows in a box

  Returns:
  --------
  <nRows> => rows in the box

  Syntax:
  -------
  SBROWS(nTop,nBottom,[lIncludeFrame])

  Description:
  ------------
  The number of rows of a box with top of <nTop> and
  bottom of <nBottom> is returned. By default, the frame is
  included (the top and the bottom)

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

  Examples:
  ---------
   nRows := SBROWS(nTop,nBottom,.f.)
   for i = nTop to nRows
     @nTop+i,nLeft say i
   next

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

 

SP_SBCOLS

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