SP_VARLEN

VARLEN()

  Short:
  ------
  VARLEN() Returns length of a variable  of any type

  Returns:
  --------
  <nLength> => Length of variable

  Syntax:
  -------
  Varlength(expX)

  Description:
  ------------
  Converts expX to character with VAR2CHAR() and then
  returns its length

  Examples:
  ---------
   VARLEN(123.45)    //returns 6

   VARLEN(.F.)       //returns 3

   VARLEN(DATE())  //returns 8

  Source:
  -------
  S_VARLEN.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