From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,94b44ecb42c031b9,start X-Google-Attributes: gid103376,public From: Matthias Teege Subject: Searching for an object Date: 2000/08/18 Message-ID: <87og2q9yyp.fsf@moon.mteege.de>#1/1 X-Deja-AN: 659846441 Sender: matthias@moon.mteege.de Organization: DVZ Datenverarbeitungszentrum Mecklenburg-Vorpommern GmbH Content-Type: text/plain; charset=iso-8859-1 User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-08-18T00:00:00+00:00 List-Id: Moin, I've defined the following type: type customer is record aname : String( 1..25); bname : String( 1..25); end record; Then I create some objects of this type and save all of them in an table. Now I want to find a special object with a find procedure like this (not authentic Ada Code :-)): procedure find ( Field : in String; What : in String; Result: out String) is while end_of_table is false loop read(object); if object.Field = What then -- field should be 'aname' -- or 'bname' Result := object.Field; exit; -- We have found it end if end loop; end find; I want to search in all Record "Fields" depend on the procedure parameter. How is the Ada way? Many thanks Matthias -- Matthias Teege -- matthias@mteege.de -- http://emugs.de make world not war PGP-Key auf Anfrage