COLLECTION


PLBCMP GUI Only

 

The COLLECTION instruction groups objects into a set. Once a COLLECTION is defined, a single instruction then be affects all the items in the set. To define a COLLECTION, use one of the following statement formats:

 

(1)

[label]

COLLECTION

[%]

(2)

[label]

COLLECTION

(arraysize )

(3)

[label]

COLLECTION

^

(4)

[label]

COLLECTION

^,{target }

(5)

[label]

COLLECTION

^(arraysize )

(6)

[label]

COLLECTION

^(arraysize),({target}),...,({target})

 

Where:

label

Optional. A Data Label.

%

Optional. Denotes the item as being GLOBAL.

arraysize

Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.

^

Optional. Denotes the item as being a POINTER.

target

Required. The name of a previously defined data item of the same type.

Flags Affected: NONE

Note the following:

  1. A COLLECTION is automatically created when a LISTINS instruction inserts the first object into the collection. Additional objects are then inserted using subsequent LISTINS instructions and removed using the LISTDEL instruction.

  2. COLLECTIONS may contain 4001 objects.

  3. COLLECTIONS may not contain an IMAGELIST, STATUSPANEL, TOOLBUTTON, or MENUITEM object.

  4. A PLFORM variable is a COLLECTION that is automatically created and initialized using a FORMLOAD instruction. If any information had previously been placed in a PLFORM using the LISTINS instruction, it is lost.

  5. Multi-dimension arrays are supported up to a maximum of fourteen dimensions.

  6. If an operation (i.e., SETPROP) is executed against a COLLECTION and it contains objects that do not support that operation, the operation is simply ignored for that object.

  7. To improve the display speed when displaying a number of objects, add each object to a COLLECTION and perform an ACTIVATE on the COLLECTION.

  8. The ^ denotes a Pointer Variable.

  9. Although a COLLECTION may be defined as Global, it is DESTROYed during a CHAIN instruction.

 

 

See Also: Example Code, Object Definitions, Object Output Instructions

 



PL/B Language Reference CLIENT COLOR