delete_nth()

Deletes an item in a list, given an integer index into the list and an existing list. Returns a new list with a deleted item. If index >= list length, then NULL is returned.

Syntax:

delete_nth(index, list);

where

index is an integer index into list. If index = list length, then NULL is returned.

list is the list to delete an item from.

Example:
decl a = list(1,2,3,4,5);
decl b;
b = delete_nth(0,a);
fputs(stdout, identify_value(b));        // deletes the 1
b = delete_nth(1,a);
fputs(stdout, identify_value(b));        // deletes the 2
b = delete_nth(4,a);
fputs(stdout, identify_value(b));        // deletes the 5
b = delete_nth(5,a);
fputs(stdout, identify_value(b));        // returns NULL

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