| |
TuSort
Format:
TuSort ( tuple, fieldname ) |
Purpose:
Sort a tuple of tuples, i.e. an array of tuples.
The parameter tuple is a tuple that contains only tuples.
The parameter fieldname must be string.
Every tuple element of tuple must have a field
fieldname.
These fields must be all of the same type, which is one
of Integer, Real, or String.
Return Values:
TuSort() returns always null.
The tuple is changed directly.
Example:
input: | resulting output:
| <let
t0 = emptytuple; t0.d=1;t0.a=2;t0.c=2;t0.b=3;
t1 = emptytuple; t1.d=4;t1.a=1;t1.c=5;t1.b=5;
t2 = emptytuple; t2.d=3;t2.a=5;t2.c=1;t2.b=4;
t3 = emptytuple; t3.d=5;t3.a=4;t3.c=4;t3.b=2;
t4 = emptytuple; t4.d=2;t4.a=3;t4.c=3;t4.b=1;
tup = emptytuple;
tup.s0 = t0; tup.s1 = t1; tup.s2 = t2;
tup.s3 = t3; tup.s4 = t4;>
before sort:<? tup>
<let r = TuSort (tup, "b")>
after sort: <? tup> |
before sort:
s0 | = | (d=1, a=2, c=2, b=3) |
s1 | = | (d=4, a=1, c=5, b=5) |
s2 | = | (d=3, a=5, c=1, b=4) |
s3 | = | (d=5, a=4, c=4, b=2) |
s4 | = | (d=2, a=3, c=3, b=1) |
|
after sort:
s0 | = | (d=2, a=3, c=3, b=1) |
s1 | = | (d=5, a=4, c=4, b=2) |
s2 | = | (d=1, a=2, c=2, b=3) |
s3 | = | (d=3, a=5, c=1, b=4) |
s4 | = | (d=4, a=1, c=5, b=5) |
|
|
See Also:
TuSearch(), TuSearchTuple().
This page was dynamically generated by the
web application development tool RADpage
of H.E.I.
H.E.I. provides support, tools, and services like
Webdesign in Mannheimm,
the HTML/CSS 3D WebGL Animation Library taccgl,
3D Webdesign, and
3D Product Configurator
(3D Produkt Konfigurator in German).
Selected blog articles :
3D Objects on HTML pages,
CSS Transition Visibility, and
CSS Transition Display.
© 1996-2024 H.E.I. All Rights Reserved.
|