PutElement Method (VARIANT)


8.7, PLBCMP GUI Only

 

The PutElement method stores a VARIANT object into the specified element of the VARIANT array. The method uses the following format:

 

[label]

{object}.PutElement

[GIVING {return}] USING [*Value=]{value}:

 

 

[*Index=]{index}[:

 

 

[[*Index1=]{index1}]:

 

 

[[*Index2=]{index2}]:

 

 

[[*Index3=]{index3}]:

 

 

[[*Index4=]{index4}]]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A VARIANT object that is accessed.

return

Optional. A Numeric Variable that indicates the success or failure of the method.

value

Required. A VARIANT that is placed into the array.

index

Required. A Numeric Variable that specifies the zero-based indexed value for the variant element in the first dimension of the array.

index1 - index5

Optional. Decimal numbers or Numeric Variables that specify the zero relative indexed value for the variant element in each respective dimension of the array.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The ZERO, OVER and EOS Condition Flags are always cleared.

  2. The CREATE VARIANT operation may only create a one dimensional VARIANT array. This method supports multiple dimensions for a VARIANT array that has been created by a control or another third party application.

  3. For improved performance in the Application Server environment, do not specify the optional return value unless needed.

 

 

See Also: Method Syntax, VARIANT Methods

 



PL/B Language Reference GetElemCount Method (VARIANT) SetElemCount Method (VARIANT)