Contact | Privacy | Datenschutzerklärung | Impressum


Format: TuSearch ( tuple, fieldname, val [, pos] )

Purpose: Search a tuple with certain field value val in 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. Search for a tuple element in tuple that has a field fieldname with value val. The parameter val must be of type Integer, Real, or String. The search begin at index position 0, but the optional parameter pos (Integer) can override this, setting a higher start position.

Return Values: TuSearch() returns the tuple found, if the search was succesful, otherwise it return null.


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 search:<? tup>
search result: <p ><? TuSearchTuple (tup, "c", 4)></p>
before search:
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)
search result:

(d=5, a=4, c=4, b=2)

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 ConfiguratorDemo (3D Produkt Konfigurator Demo in German).
© 1996-2021 H.E.I. All Rights Reserved.

Component Guide
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    heitml Tags
    heitml Functions
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  New Features
  heitml 1
User Guide
Contact / Impressum