SP_FILEREAD

FILEREAD()

  Short:
  ------
  FILEREAD() Lists a text file of unlimited size

  Returns:
  --------
  nothing

  Syntax:
  -------
  FILEREAD([nTop,nLeft,nBottom,nRight],[cFileName],[cTitle],;
            [lSearch],[lMark])

  Description:
  ------------
  Lists text file [cFileName] of unlimited size in a
  programmer definable window of dimensions [nTop..nRight]

  Allows up down right left scrolling. Use this for
  reports or output sent to a disk file.

  If [cFileName]  is not passed, a box asks for the
  filespec and then allows a picklist of files of that spec. If
  [cFileName] is passed as a wildcard (i.e. "*.DOC"). a picklist
  of files of that spec is presented.

  If [nTop..nRight] are not passed, a default window of
  dimensions 2,2,22,78 is used.

  [cTitle] is an optional title. This overrides the
  default which is the file name.

  [lSearch] is a switch to allow text searches. Default
  is True

  [lMark] is a switch to allow block marking (with Copy
  to File or Print) Default is True.

  Examples:
  ---------
   REPORT FORM summary TO summary.txt
   FILEREAD(2,2,22,78,"SUMMARY.TXT","Summary File")

  Notes:
  -------
  Fileread() will use SET DEFAULT if no path is
  specified.

  Source:
  -------
  S_FILER.PRG

 

SP_FILEINFO

FILEINFO()

  Short:
  ------
  FILEINFO() Returns file date,time,size

  Returns:
  --------
  <expInfo> => Returns file date,time or size

  Syntax:
  -------
  FILEINFO(cFileName,nInfo)

  Description:
  ------------
  Returns info on file in <cFileName> based on param
  passed as <nInfo>

     1  - returns file size (numeric)

     2  - returns file date (date)

     3  - returns file time (character)

  Examples:
  ---------
   nFilesize     := fileinfo("customer.dbf",1)
   dFileDate     := fileinfo("customer.dbf",2)
   dFileTime     := fileinfo("customer.dbf",3)

  Source:
  -------
  S_FILEIN.PRG

 

SP_FIELDTYPEX

FIELDTYPEX()

  Short:
  ------
  FIELDTYPEX() Returns type of field

  Returns:
  --------
  <cType> => field TYPE

  Syntax:
  -------
  FIELDTYPEX(expField)

  Description:
  ------------
  <expField> is either the numeric position of the
  field in the database, or the name of the field.

  Examples:
  ---------
   IF FIELDTYPEX(i) =="N"
     nSum += fieldget(i)
   ENDIF

  Notes:
  -------
  Just using VALTYPE(FIELDGET(n)) is fine, except that
  memo fields then show as type "C". Not always wanted.

  Source:
  -------
  S_FIELDS.PRG

 

SP_FIELDPOSX

FIELDPOSX()

  Short:
  ------
  FIELDPOSX() Returns position of field named in expression

  Returns:
  --------
  <nPosition> => natuaral position of field (0 if not found)

  Syntax:
  -------
  FIELDPOSX(cField)

  Description:
  ------------
  <cField> is an expression containing the name of a  field. Can
  also include the alias.

  Examples:
  ---------
   ?FIELDPOSX("CUSTOMER->LNAME")
   ?FIELDPOSX("LNAME")

  Notes:
  -------
  FIELDPOS() (a Clipper function) works with field
  names, but will not allow the ALIAS.

  Source:
  -------
  S_FIELDS.PRG

SP_FIELDLENX

FIELDLENX()

  Short:
  ------
  FIELDLENX() Returns length of field

  Returns:
  --------
  <nLength> => field LENGTH

  Syntax:
  -------
  FIELDLENX(expField)

  Description:
  ------------
  <expField> is either the numeric position of the
  field in the database, or the name of the field.

  Examples:
  ---------
   FOR i = 1 to fcount()
     nSumLengths += FIELDLENX(i)
   ENDIF

  Source:
  -------
  S_FIELDS.PRG

 

SP_FIELDDECX

FIELDDECX()

  Short:
  ------
  FIELDDECX() Returns decimals of field

  Returns:
  --------
  <nDec> => field DECIMALS

  Syntax:
  -------
  FIELDDECX(expField)

  Description:
  ------------
  <expField> is either the numeric position of the
  field in the database, or the name of the field.

  Examples:
  ---------
   FOR i = 1 to fcount()
     nSumDecs += FIELDDECX(i)
     // could also be:  nSumDecs += FIELDDECX(FIELD(i))
   ENDIF

  Source:
  -------
  S_FIELDS.PRG

 

SP_FASTFORM

FASTFORM()

  Short:
  ------
  FASTFORM() Prints a selected formletter for current record

  Returns:
  --------
  Nothing

  Syntax:
  -------
  FASTFORM()

  Description:
  ------------
  Presents a picklist of formletters to print against
  contents of current record.

  Examples:
  ---------
   If nChoice = 4    // form letter
     FASTFORM()
   endif

  Notes:
  -------
  Utilizes a form created by FORMLETR() and plugs in
  values from the current record. Interface is a picklist of forms
  available. Depends on the current DBF to match the field values
  in the form.

  Source:
  -------
  S_FFORM.PRG


SP_FADEAWAY

FADEAWAY()

  Short:
  ------
  FADEAWAY() Fades screen away , alternative to restscreen()

  Returns:
  --------
  Nothing

  Syntax:
  -------
  FADEAWAY(cInScreen,nTop,nLeft,nBottom,nRight)

  Description:
  ------------
  Fades <cInscreen>, a screen stored with SAVESCREEN(),
  back onto the screen at <nTop>,<nLeft>,<nBottom>,<nRight>. Here
  for compatibility. See SS_FADE().

  Examples:
  ---------
   See SS_FADE()

  Source:
  -------
  S_SCREEN.PRG

 

SP_EXPBLOCK

EXPBLOCK()

  Short:
  ------
  EXPBLOCK() Returns a codeblock to evaluate an expresson

  Returns:
  --------
  <bBlock> => codeblock to evaluate an expression

  Syntax:
  -------
  EXPBLOCK(cExpress)

  Description:
  ------------
  Returns a codeblock built around the expression in
  cExpress.

  Using EVAL() on the codeblock will return the current
  value of the expression.

  Examples:
  ---------
   cExp := "UPPER(LEFT(CUSTOMER->LNAME,5))"
   bExp := EXPBLOCK(cExp)

   ?eval(bExp)
     // displays current value of customer->lname, upper,left 5

  Notes:
  -------
  See also WORKBLOCK()

  Source:
  -------
  S_FIELDS.PRG

 

SP_EVALQ

EVALQ()

  Short:
  ------
  EVALQ() Evaluates a logical condition in a string

  Returns:
  --------
  <lTrue> => result of evaluating condition

  Syntax:
  -------
  EVALQ(cCondition)

  Description:
  ------------
  Macro expands <cCondition> and returns logical result

  Examples:
  ---------
   locate for evalq( sls_query() )

  Notes:
  -------
  In Clipper 5.01, you're better off doing
       bQueryblock := &("{||"+sls_query()+"}")
       locate for eval(bQueryblock)

  You'll get close to a 100% speed improvement.

  Source:
  -------
  S_EVALQ.PRG