SP Expression Functions

 FIELDLENX()    Returns length of field
 EXPBLOCK()     Returns a codeblock to evaluate an expresson
 FIELDTYPEX()   Returns type of field
 FIELDPOSX()    Returns position of field named in expression
 FIELDDECX()    Returns decimals of field
 PARSFIELD()    Exracts the name of the field from an expression
 BLANKREC()     Blanks out a record
 PARSALIAS()    Exracts the name of the alias from an expression
 WORKBLOCK()    Returns a set-get block for field named in an expression
 BLANKFIELD()   Returns a blank value corresponding to a field
 ISBLANKREC()   Determines if a record is blank
 ISFIELD()      Determines if an expression is the name of a field
 ISTHISAREA()   Determines if expression is the name of a field in this area

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