I have seen similar previous posts, but I seem to still be stuck. My current if statement, even when it fails, outputs the "if true" code. So I'd like to ask what the proper syntax is if I don't want to do anything else if the condition turns to be false.
My code that fails:
(Disease == malaria
-> (patient_age(y)
-> writeln('Since patient is young, likelihood of malaria increases.')
; true)
;
Disease == tuberculosis
-> (patient_age(e)
-> writeln('Since patient is old, likelihood of tuberculosis increases.')
; true)
).
What happens is that, even if patient_age() is false, the writeln() statement is still executed. I have attempted replacing the "false code" with another writeln() statement, which did not display. I apologize that this has been asked before. Thank you very much.