Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - afieldname() return the name of a field in an alias http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 afieldname()        Return the name of a field in an alias
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   func char afieldname extern
   param       alias sDatabase, ;
         value uint  uField

 Arguments
   sDatabase is the alias to retrieve information about.
   uField is the field number.

 Return
   The name of the field.

 Description
   The afieldname() function returns the name of the uField-th field
   in sDatabase.

   The function only considers the fields which have been declared in the
   matching dbfdef statement, i. e. the physical database file might contain
   more fields.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_afieldname
   vardef
      uint n
   enddef
   open sTest
   for n := 1 to NUM_FIELDS
      ? n, afieldname( sTest, n )         // show field names
   next
   endproc

   proc main
   Test_afieldname()
   endproc

See Also: afieldtype() fieldname()

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