When i have two conditions, with an action for each condition, and an action for both conditions if one is true,
Sometimes I do this
if (cond1 or cond2)
if (cond1)
do act 1
if (cond2)
do act 2
do always
Sometimes I do this
if (cond1)
do act 1
do always
if (cond2)
do act 2
do always
But I would really like to do this
if (cond1)
do act 1
or if (cond2)
do act 2
then
do always
Does the last method exist in any language, or is there a preferred method for handling this situation?
Thanks.
I would suggest the following: