list_dup

Duplicates the current item in a list.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

void list_dup(list-name)
list          list-name

Description

Duplicates an item, sets the item as current and sets its status to item_insert.

Example

Prints the original and duplicated current item and its status.
{
 list xx;
 xx = list_open("20 16 10", 1000, "Data List");
 list_mod(xx, 1, "1", "2", "3");

 printf("Current item: " ^^ list_curr(xx,0));
 printf("Current status: " ^^ list_stat(xx));
 list_dup(xx);
 printf("New item: " ^^ list_curr(xx,0));
 printf("New status: " ^^ list_stat(xx));
 list_close(xx);
}