Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

preArraySet

preArraySet( 
g_array 
g_index 
n_modifier 
) 
=> n_newValue

Description

Takes array or an associated table element with an index g_index, adds an n_modifier value to its original value, stores the new value back into the array, and returns the updated value.

If the associated table element is not a number or g_index is not valid, it returns an error.

Arguments

g_array

An array or an associated table.

g_index

An index in the array or an associated table.

n_modifier

The value that should be added to the element.

Value Returned

n_newValue

New value of the element i.e, (g_array [g_index] + n_modifier)

Examples

a = vector(1 2 34)
array@0x8382028
preArraySet(a 2 3)
=> 37
preArraySet(a -4 9) 
*Error* setarray: array index out of bounds -
preArraySet(a -4 9)

Related Topics

postdecrement

predecrement

preincrement


Return to top
 ⠀
X