SP_FILLARR

FILLARR()

  Short:
  ------
  FILLARR() Fill type, length, decimal arrays

  Returns:
  --------
  Nothing - works on arrays passed

  Syntax:
  -------
  FILLARR(aNames,aTypes,[aLens],[aDeci])

  Description:
  ------------
  Fills in TYPE <aTypes> , LENGTH [aLens] and DECIMAL
  [aDeci] arrays given a FIELDNAME array <aNames>.

  Arrays (3 and 4) are optional.

  Examples:
  ---------
   nFields   :=LEN(aFieldNames)
   aFldtypes     := array(nFields)
   aFldLens      := array(nFields)
   aFldDeci      := array(nFields)
   FILLAR(aFieldNames,aFldTypes,aFldLens,aFldDeci)

  Warnings:
  ----------
  Macro expands an expression to obtain type-could
  crash if expression passed is invalid. Not really meant for
  expressions, but people will pass them from time to time.

  Notes:
  -------
  In most circumstances you would fill all of these
  arrays with one call to AFIELDS(), but there are exceptions.

  Source:
  -------
  S_FILLAR.PRG

 

SP_AFLENSX

AFLENSX()

  Short:
  ------
  AFLENSX() Returns an array of field LENGTHS for current dbf

  Returns:
  --------
  <aFields> => an array of field LENGTHS for the
  current dbf

  Syntax:
  -------
  AFLENSX()

  Description:
  ------------
  AFLENSX() creates and returns an array of field
  lengths from the current dbf. Unlike AFIELDS(), it does not
  require an initialized array beforehand.

  Examples:
  ---------
   aArray := AFIELDSX()
   aTypes := AFTYPESX()
   aLens  := AFLENSX()
   aDeci  := AFDECIX()

   if (nSelect := mchoice(aArray,10,10,20,20,"Pick Field")) >  0
      ?"Field "+aArray[nSelect]+" was selected"
      ?" of type     "+aTypes[nSelect]
      ?" of length   "+aLens[nSelect]
      ?" of decimals "+aDeci[nSelect]
   endif

  Source:
  -------
  S_AFTYPE.PRG