If a variable can take n values should we check for the validity of the values or assume that if all the n-i checks fail it would be the nth value.
For example if we have a variable that stores gender as M or F. Use this:
If gender = "M"
do male_processing
else
do female_processing
endif
Or this:
If gender = "M"
do male_processing
else
if gender = "F"
do female_processing
else
print "Something has gone wrong Gender has a value " Gender
endif
endif
For this type of construct, I like to use the switch statement. Not because it is shorter (it is not), but it is more readable (IMHO):