DO CASE CASE m.llCondition1 = .t. *!* do required work when m.llCondition1 is .t. and skip any other processing for other Conditions CASE m.llCondition2 = .t. *!* do required work when m.llCondition2 is .t. and skip any other processing for other Conditions CASE m.llCondition3 = .t. *!* do required work when m.llCondition3 is .t. and skip any other processing for other Conditions CASE m.llCondition4 = .t. *!* do required work when m.llCondition4 is .t. and skip any other processing for other Conditions OTHERWISE *!* do required work when no Condition is .t. ENDCASEOr do the same thing with if/endif requires (IMO) confusing nested if/else/endif structures or multiple exit points.
IF m.llCondition1 = .t. *!* do required work when m.llCondition1 is .t. and skip any other processing for other Conditions ELSE IF m.llCondition2 = .t. *!* do required work when m.llCondition2 is .t. and skip any other processing for other Conditions ELSE IF m.llCondition3 = .t. *!* do required work when m.llCondition3 is .t. and skip any other processing for other Conditions ELSE IF m.llCondition4 = .t. *!* do required work when m.llCondition4 is .t. and skip any other processing for other Conditions ELSE *!* do required work when no other Condition is .t. ENDIF ENDIF ENDIF ENDIFOr using multiple if / endif combined with otherwise unnecessary m.llWorkdone flag
local m.llWorkdone m.llworkdone = .f. IF m.llCondition1 = .t. *!* do required work when m.llCondition1 is .t. and skip any other processing for other Conditions m.llWorkdone = .T. ENDIF IF m.llWorkdone = .f. AND m.llCondition2 = .t. *!* do required work when m.llCondition2 is .t. and skip any other processing for other Conditions m.llWorkdone = .T. ENDIF IF m.llWorkdone = .f. AND m.llCondition3 = .t. *!* do required work when m.llCondition3 is .t. and skip any other processing for other Conditions m.llWorkdone = .T. ENDIF IF m.llWorkdone = .f. AND m.llCondition4 = .t. *!* do required work when m.llCondition4 is .t. and skip any other processing for other Conditions m.llWorkdone = .T. ENDIF IF m.llWorkdone = .f. *!* do required work when no Condition is .t. m.llWorkdone = .T. ENDIF