
Stephan and Daniel,
Thank you both very much. It worked!
cheers,
M
________________________________
From: Daniel Fischer
Hello folks,
just a quickie here and would appreciate any help...
Stephen already told you that it should be if (honesty volunteer) ... , so
In this expression:
instance OBSERVATIONS Drinkability WaterWell Volunteer where observe (Drinkability waterWell) volunteer = volunteer {vReport = if (odorQuale (perceive (Odor waterWell) volunteer) == True && clarityQuale (perceive (Clarity waterWell) volunteer) == True && fullnessQuale (perceive (Fullness waterWell) volunteer) == True) then (if (honesty) then "drinkable" else "undrinkable") else (if (honesty) then "undrinkable" else "drinkable")}
Don't use 'if condition == True'. For Bool values, (== True) is the identity function, so 'condition == True' is exactly the same as 'condition'. Cheers, Daniel
participants (1)
-
Mohamed