LISTGET


9.0

 

The LISTGET instruction stores the address of an object in a COLLECTION into a VAR variable. The instruction uses the following formats:

 

(1)

[label]

LISTGET

{{dest}{sep}{index}{sep}{collection}

 

Where:

label

Optional. A Data Definition Label.

dest

Required. A VAR variable into which the specified COLLECTION object's address is stored.

sep

Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

index

Required. A one based Numeric variable or decimal number that identifies the object in the COLLECTION.

collection

Required. A COLLECTION object that is accessed.

Flags Affected: OVER

Note the following:

  1. If the COLLECTION object has not been created, the OVER flag is set TRUE and {dest} remains unchanged.

  2. If the {index} has a value larger than the number of objects in the COLLECTION, the OVER flag is set TRUE and {dest} remains unchanged.

  3. This information stores the object's address into an appropriate object pointer that can then be used in other PLB GUI instructions.

  4. The TYPE instruction can retrieve information about the {dest} variable.

 

 

See Also: Example Code, Object Instructions

 



PL/B Language Reference LISTDEL LISTINS