list_copy
Copies a list.
Available in:
Apps (win) |
Apps (char) |
Reportwriter |
RPC |
Standalone PL |
X |
X |
X |
X |
X |
Syntax
list list_copy(list-name)
list list-name
Description
Returns a duplicate list.
list-name | specifies the list to copy.
|
Example
Prints part of the original list and then the same part of
the copied list.
{
int i;
list xx, yy;
xx = list_open("20 16 10", 1000, "List A");
list_mod(xx, 3, "1", "2", "3");
yy = list_copy(xx);
list_seek(xx,0);
for (i=list_rows(xx);i;i--) {printf(list_read(xx,0));
printf(list_read(xx,2));}
list_seek(yy,0);
for (i=list_rows(yy);i;i--) {printf(list_read(yy,0));
printf(list_read(yy,2));}
list_close(xx);
list_close(yy);
}