I am trying to write a very simple little program that will search a record
and give me a result of true if the word is in the record, false if it
isn't.

as an example...

Lex=lex(1:X1 2:X2 3:X3 4:X4)

declare
     fun {IsItThere W}
          if Lex.W \=nil then true
     else
          false
     end
end

Firstly it doesn't work right, and I think I have the semantics wrong for
using a record.  If it were a list i would use the case statement and pull
the head off compare them, and repeat it until the list was nil.  But for a
record to see if it is in there at all, you just have to {Browse Lex.W} and
it would come up with the result if it is there or an error if it isn't.
Can I make this a boolean function easily?

Kurt
-- 
Kurt Breitsprecher
(807) 474-9601
[email protected]
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to