I am writing a procedure that requires a certain set of criteria to happen before the end of the code can process. I need to know, other than a huge set of nested IF ENDIF calls, is there away to jump out of the code.
Here is an example.
In the CLICK method for a button that is labeled NEXT... when the user clicks on the NEXT button, it needs to process some information. If any of it fails it needs to remain on the current form after displaying an error msg. Writing this with IF's would look something like this.
IF - verify proper field data is ok
** data OK
IF - verify file exists
** file exists
IF - processed info created
** processed complete
IF - remaining criteria met
** all done
** thisform.release
ELSE
** display error
ENDIF
ELSE
** display error
ENDIF
ELSE
** display error
ENDIF
ELSE
** display error
ENDIF
This is true structured programming because it doesn't release the form until all the criteria is met.... BUT... and I know this is wrong for true programmers... but for a large chunk of code, it's easy to lose track of which loop you are in and what needs to happen. I was wondering if there was something like an EXIT call that get you out of the button code and return to the form input.
Peter Brama
West Pointe Enterprises
VFP is getting easier but STILL alot to learn!!