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 X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: Searching for an object Date: 2000/08/21 Message-ID: #1/1 X-Deja-AN: 660907027 References: <87g0nyy1kk.fsf@moon.mteege.de> X-Complaints-To: abuse@home.net X-Trace: news1.frmt1.sfba.home.com 966898724 24.20.190.201 (Mon, 21 Aug 2000 15:58:44 PDT) Organization: @Home Network NNTP-Posting-Date: Mon, 21 Aug 2000 15:58:44 PDT Newsgroups: comp.lang.ada Date: 2000-08-21T00:00:00+00:00 List-Id: > if in_field = "field1" and for_this_string = "foo" > then > result = "found"; > if in_field = "field2" and for_this_string = "foo" > then > result = "found"; > >I'm looking for a short notation like >"record.$fieldname". I hope I can make you understand. :-) I'm confused. The example pseudo-code indicates there are two fields, "in_field" and "for_this_string", while record.$fieldname suggests, to me, that you want multiple different field names in your record. If you don't like the successive "if"s, how about if for_this_string = "foo" and then ada.strings.fixed.index("field1 field2", in_field) /= 0 then result := "found"; (assuming, of course, that all strings are the indicated length). If I understand correctly what you mean by record.$fieldname, why not just have the record contain an array of the fields?