From: tmoran@bix.com
Subject: Re: Searching for an object
Date: 2000/08/21
Date: 2000-08-21T00:00:00+00:00 [thread overview]
Message-ID: <Euio5.122343$i5.1793130@news1.frmt1.sfba.home.com> (raw)
In-Reply-To: 87g0nyy1kk.fsf@moon.mteege.de
> 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?
next prev parent reply other threads:[~2000-08-21 0:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-18 0:00 Searching for an object Matthias Teege
2000-08-21 0:00 ` Gerald Kasner
2000-08-21 0:00 ` Matthias Teege
2000-08-21 0:00 ` Ted Dennison
2000-08-21 0:00 ` Matthias Teege
2000-08-21 0:00 ` Ted Dennison
2000-08-21 0:00 ` tmoran [this message]
2000-08-22 0:00 ` Matthias Teege
2000-08-22 0:00 ` tmoran
2000-08-31 21:55 ` John McCabe
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox