Function EN Version 2.00

@ReorgList

Float List Misc NUMBER Text TimeDate

Syntax

@ReorgList(LIST1;SEQUENCE1);

Description

This @Function rearranges the elements of a list and returns the newly ordered list.
TEXTLIST/FNLIST/TDLIST LIST1 is the list whose elements are to be rearranged.
FNLIST SEQUENCE1 specifies the new order.
LIST1 and SEQUENCE1 must contain the same number of elements.
In the new list, position X contains the element from the old LIST LIST1 thas is referenced by the SEQUENCE1 at position X.

Example @ReorgList(LIST1;SEQUENCE1):

Example 1:

List:=@ReorgList("AAA":"BBB:"CC";3:2:1);

List is assigned the TEXTLIST "CC":"BBB":"AAA" assigned.

Example 2:

List:=@ReorgList("AAA":"BBB:"CC";3:1:2);

List is assigned the TEXTLIST "CC":"AAA":"BBB" assigned.

Example 3:

List:=@ReorgList("AAA":"BBB:"CC";1:3:2);

List is assigned the TEXTLIST "AAA":"CC":"BBB" assigned.

Example 4:

List:=@ReorgList(11:22:33;1:3:2);

List is assigned the FLOATLIST 11:33:22 assigned.

Example 5:

LIST1:=[30.06.1987 00:06:28]:[16.02.1991 16:46:00]:[28.10.1989 13:29:05];
SEQUENCE1:=2:3:1;
Ret:=@ReorgList(LIST1;SEQUENCE1);

Ret is assigned the TDLIST 16.02.91 16:46:00;28.10.89 13:29:05;30.06.87 00:06:28 assigned.

Note : This text was machine-translated and may contain inaccuracies.