SORT# returns a string containing a sorted Telitab set
SORT#(Telitab$, SortPar$, [Mode%=0 or 1])
Arguments
Before explaining the SORT# function, some words on unfolding a Telitab set for a particular parameter. Unfolding implies that the record(s) containing this parameter are moved to the top of the hierarchy.
So if Telitab_1$ contains the dataset:
To explain the data:
you have two objects, MODELS and PROJECTS presented as list values in Telitab_1$ containing TeLiTabs themselfs (with several parameters).
LPP is part of the MODELS object (TeLiTab).
When you unfold Telitab_1$ dataset on parameter "LPP", you get:
You see that PROJECT still is a separate object (and presented as a list value in Telitab_1$). All other data (which was part of the MODELS object) now is part of Telitab_1$ and thus a table in the TeLiTab.
To unfold a Telitab set for a particular parameter implies that the record(s) containing this parameter are moved to the top of the hierarchy. If UnfoldPar$ = "NullString", no unfolding is performed.
The SORT#() function unfolds and sorts de telitab like in the following example:
SORT#(Telitab_1$, "LPP", 0)
or
SORT#(Telitab_1$, "LPP"))
returns:
SORT#(Telitab_1$, "LPP", 1)
returns:
If SortPar$ contains a parameter which does not occurr in the Telitab$ set, an error message is returned:
"No valid Sort parameter: "ParName" given in SORT# function."
Quick links: Functions overview | Attribute overview | Constants overview | Dimensions overview