repla()

Replaces an item in a list. Returns the original list, modified with the replaced item.
If a list a is assigned to list b , it is assigned a pointer in a sense. However, if a is modified using repla(), then a and b continue to point to the same list. If a is modified using any function other than repla(), then a copy is made and a and b no longer point to the same list.

Syntax:

repla(list, item, index);

where

list is a list created with the list function.

item is the new list item.

index is the position in the list of the item to replace, numbered from 0 to n−1.

Example:
decl list1;
list1 = list(1, 2, 3);
repla(list1, 5, 2);
// The result is list1 = 1, 2, 5

Where Used:

Measurement Expressions (Data Display equations and Schematic MeasEqns), Schematic, Layout, Simulation, GUI

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources