IF
expressions are conditionally tested, i.e., are only tested if the previous conditions succeeded. That's why I posted example code.IF
statement in VFP with multiple conditions will ever test all conditions if one of them fails. Whether or not the steps should be conditional would have already been determined prior to writing any code.return
) have assumed that the steps are conditional -- to wit, return
and "not cases" extremely clear and obvious. I have not found nested ifs clear and obvious in most situations that I have seen them. I do still prefer "not cases" as I can maintain them better - e.g., if one particular case fails and requires special handling in one caller only (I've seen this more than I thought I ever would), it's easier to add the handler code/call to the case.