Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exiting
Message
From
25/07/2001 13:44:40
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Exiting
Miscellaneous
Thread ID:
00535201
Message ID:
00535201
Views:
33
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!!
Next
Reply
Map
View

Click here to load this message in the networking platform