SetArrayItemValue

PowerBuilder Native Interface

IPB_Session interface:

SetArrayItemValue method

Description

Sets the value of an array item to the value of an IPB_Value.

Syntax

SetArrayItemValue( pbarray array, pblong dim[ ], IPB_Value* src)

Argument

Description

array

A valid pbarray structure in which you want to set an array item to null.

dim

A pblong array to hold the indexes of each dimension of the array. The size of the array must equal the dimensions of array.

src

The value to which the array item is to be changed.

Return Values

None.

Examples

This code sets the value of each item in an array:

for( i=1; i <= bound; i++)
{
   dim[0]= i;
   ipv = Session -> AcquireArrayItemValue(refArg, dim);
   Session -> SetArrayItemValue(*i_array, dim, ipv);
   Session -> ReleaseValue(ipv);
}

Usage

The SetArrayItemValue method does not verify that the datatype of the replacement value matches the datatype of the original value.

See Also