Using a condition in an if statement only if another condition is true

Hi there,

I am trying to write an if statement to filter out some data, starting with 5 conditions a,b,c,d,e.

I am wanting to fill the histogram with only with data for if all a,b,c are true, and additionally && d if and only if condition e is true. If e is not true then I don't need d at all.

It has puzzled me for a few days, any ideas anyone?

Thanks in advance for the help
Jason



if (a && b && c && (d || !e))
Thanks Athar for the reply. Took me a while to actually understand what it did but it was all good!

Cheers
Jason
Topic archived. No new replies allowed.