Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function bldndx() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION BLDNDX()

  Short:
  ------
  BLDNDX() Interactively create a new index

  Returns:
  --------
  <cIndexName> => New index name less extension

  Syntax:
  -------
  BLDNDX([aFields,aDescriptions],[aIndexfiles],[Buildex])

  Description:
  ------------
  Allows point and shoot building of a new index.

  [aFields] - an array of legal field names. If not
  passed, all fields  in current DBF will be used.

  [aDescriptions] - an array of field descriptions. If
  not passed,field names  in current DBF will be used.

  Pass both or neither of  [aFields] and
  [aDescriptions].

  [aIndexFiles]   - an array of currently open index
  files to be reopened on exit from bldndx() (up to 10).
  Otherwise, only the newly created index file will be left open.

  [lBuildex]  - allow use of Buildex() to build complex
  expressions. Default is False.

  Examples:
  ---------
   BLDNDX()

    -- or --

   aNdxFlds  := {"LASTNAME","FIRSTNAME","CITY"}
   aNdxDesc  := {"Last Name","First Name","City"}
   aNdxOpen  := {"CUSTOMER","STATE","ZIPCODE"}
   BLDNDX(aNdxFlds,aNdxDesc,aNdxOpen)
   BLDNDX(nil,nil,aNdxOpen,.t.)   // use buildex()

  Warnings:
  ----------
  Indexes created with this function will require the
  functions DTOS() and NBR2STR() be loaded prior to use if a date
  or numeric field is part of the index. You can do this with the
  EXTERNAL statement.

  EXTERNAL DTOS, NBR2STR

  Notes:
  -------
  All fields are converted to type Character. The
  function NBR2STR() is used to create a usable character
  expression from a numeric field by first adding 1,000,000 to the
  number.

  Source:
  -------
  S_BLDNDX.PRG


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson