SP_AFIELDSTYPE

AFIELDSTYPE()

  Short:
  ------
  AFIELDSTYPE() Returns an array of field names of particular type

  Returns:
  --------
  <aFields> => an array of field names of the selected type(s)

  Syntax:
  -------
  AFIELDSTYPE(cTypes)

  Description:
  ------------
  <cTypes> is a string containing one or more field
  type symbols

  Valid symbols are:

       C   character    N   numeric
       L   logical      D    date          M   memo

  If no fields of the specified type(s) exist, an empty
  array will be returned.

  Examples:
  ---------
   aMemos := AFIELDSTYPE("M")  // an array of memo fields
   aNums  := AFIELDSTYPE("N")  // an array of numeric fields
   aNums  := AFIELDSTYPE("LD")  // an array of date &logical fields

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

Online resources provided by: http://www.ousob.com — NG 2 HTML conversion by Dave Pearson


 

SP_AFDECIX

AFDECIX()

  Short:
  ------
  AFDECIX() Returns an array of field DECIMALS for current dbf

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

  Syntax:
  -------
  AFDECIX()

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

  Examples:
  ---------
   aArray := AFIELDSX()
   aDeci  := AFDECIX()
   if (nSelect := mchoice(aArray,10,10,20,20,"Pick Field")) > 0
      ?"Field "+aArray[nSelect]+" was selected"
      ?" with  decimals "+aDeci[nSelect]
   endif

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