Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>fieldget()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FIELDGET()
 Retrieve the value of a field using the ordinal position of the field in the
 database structure
------------------------------------------------------------------------------
 Syntax

     FIELDGET(<nField>) --> ValueField

 Arguments

     <nField> is the ordinal position of the field in the record
     structure for the current work area.

 Returns

     FIELDGET() returns the value of the specified field.  If <nField> does
     not correspond to the position of any field in the current database
     file, FIELDGET() returns NIL.

 Description

     FIELDGET() is a database function that retrieves the value of a field
     using its position within the database file structure rather than its
     field name.  Within generic database service functions this allows,
     among other things, the retrieval of field values without use of the
     macro operator.

 Examples

     .  This example compares FIELDGET() to functionally equivalent
        code that uses the macro operator to retrieve the value of a field:

        LOCAL nField := 1, FName, FVal
        USE Customer NEW
        //
        // Using macro operator
        FName := FIELD( nField )         // Get field name
        FVal := &FName                   // Get field value
        // Using FIELDGET()
        FVal := FIELDGET( nField )       // Get field value

 Files:  Library is CLIPPER.LIB.

See Also: FIELDPUT()

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