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 . Technical Reference - <b>addfield()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 addField()
 Add a column (field) to the workarea
------------------------------------------------------------------------------
 Prototype

     ERRCODE addField(
                       WORKAREAP wa,
                       DBFIELDINFOP dbFieldInfo
                     )

 Arguments

     wa is a pointer to self.

     dbFieldInfo is a pointer to a structure containing information about
     a column in the workarea.

 Description

     Adds a column specified by dbFieldInfo to the wa workarea.

 Default Behavior

     addField() inserts the column referred to by dbFieldInfo into the data
     table referenced by the WORKAREA structure.  The new column is added to
     the end of the wa->fields structure.  wa->fieldCount is updated to
     reflect the addition.

     Note:  Call setFieldExtent() prior to adding fields to the WORKAREA
     structure.  setFieldExtent() sizes and clears the wa->fields structure,
     readying it for use.

     Warning!  wa->fieldCount must be less than wa->fieldExtent or an
     assertion error will be raised.

 Implementation Notes

     .  Most implementations should use the default behavior for
        addField().  However, if you change the addField() implementation, be
        aware of the order imposed on adding fields to the workarea
        structures.

 Files:  Header file is Rdd.api.


See Also: DBFIELDINFO WORKAREA setFieldExtent()

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