I'm converting an FP2.6 program to VFP. It's going well, but I'm hitting some issues with some RETURN statements.
The FP2.6 version has conditions all over the place, and if these conditions are not met, it simply RETURNs out of the program. Now most of these portions of code are going into an object event procedure thing.
I can't RETURN out of cmdButton.Click, can I? Would EXITPROC work? Basically, if the condition is not met, I want to stop processing, but I'd like to avoid multiple-nested IF statements...
IF condition
.
.
.
IF condition2
.
.
.
IF !condition3
etc
Instead I'd prefer:
IF !condition
EXIT
ENDIF
.
.
.
IF !condition2
EXIT
ENDIF
.
.
.
etc
The FP2.6 version has conditions all over the place, and if these conditions are not met, it simply RETURNs out of the program. Now most of these portions of code are going into an object event procedure thing.
I can't RETURN out of cmdButton.Click, can I? Would EXITPROC work? Basically, if the condition is not met, I want to stop processing, but I'd like to avoid multiple-nested IF statements...
IF condition
.
.
.
IF condition2
.
.
.
IF !condition3
etc
Instead I'd prefer:
IF !condition
EXIT
ENDIF
.
.
.
IF !condition2
EXIT
ENDIF
.
.
.
etc