User Tools

Site Tools


getgroup_return_reference_to_group_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== GETGROUP (return reference to GROUP) ====== Previous pageReturn to chapter overviewNext page

GETGROUP( group, number [,dimension] )

blk2blue.jpg

GETGROUP Returns a reference to a specified group structure.
group The label of a GROUP or QUEUE declaration.
number An integer expression specifying the ordinal position of a GROUP or QUEUE in the specified group.
dimension An optional dimension element number, if applicable.

The GETGROUP statement returns a GROUP reference to the number specified field from a target group structure. If the number specified field is a dimensioned field, then GETGROUP returns a reference to the dimension element of the number field. GETGROUP returns a NULL reference if the number specified is not a GROUP. GETGROUP will also return NULL if the number specified is a dimensioned group and no dimension is specified.This function can be used to access a field that is part of a dimensioned GROUP.

Return Data Type: STRING

Example:

MyGroup  GROUP

SubGroup  GROUP,DIM(3)

number     LONG,DIM(5)

         END

        END

       

gr &GROUP

lr ANY

CODE

 gr &= GETGROUP(MyGroup, 1, 2)

 lr &= WHAT(gr, 1, 4)

 !lr now references MyGroup.SubGroup[2].number[4]

See Also:

HOWMANY

ISGROUP

WHAT

WHERE

WHO

getgroup_return_reference_to_group_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1