Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Harbour Version 0.37 (c) reference Guid - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

AFIELDS()

Fills referenced arrays with database field information
---------------------------------------------------------------------------------

 Syntax

        AFields(<aNames>[,<aTypes>][,<aLen>][,<aDecs>]) --> <nFields>  

 Arguments

        <aNames>    Array of field names      

        <aTypes>    Array of field names      

        <aLens>    Array of field names      

        <aDecs>    Array of field names    

 Returns

        <nFields>   Number od fields in a database or work area    

 Description

      This function will fill a series of arrays with field  names,field
      types,field lenghts, and number of field  decimal positions for the
      currently selected or designed  database. Each array parallels the
      different descriptors  of a file's structure.The first array will
      consist of the  names of the fields in the current work area.All
      other arrays  are optional and will be filled with the
      corrensponding data.  This function will return zero if no
      parameters are specified  or if no database is avaliable in the
      current work area.Otherwise,  the number of fields or the lenght of
      the shortest array argument,  witchever is smaller, will be
      returned.

 Examples

      FUNCTION Main()
         LOCAL aNames:={},aTypes:={},aLens:={},aDecs:={},nFields:=0

         USE Test

         dbGoTop()
         nFields:=aFields(aNames,aTypes,aLens,aDecs)

         ? "Number of fields", nFields

         RETURN NIL

Status

      Ready

 Compliance

      AFIELDS() is fully CA-Clipper compliant.

 Files

      Library is rdd
      Library is rdd

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