Almost.

What I am saying is if your exit condition in the while loop tests true, you 
set vAbort = 1 and break out of the while loop with BREAK

After the while loop you test vAbort and exit the eep with RETURN if vAbort = 1

I hope that is clear. You have to provide the correct conditional clause in my 
IF statement.

________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Jim Belisle
Sent: Wednesday, August 12, 2009 3:36 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: WHILE LOOP

Dennis,

I think you have it. I want to make sure I understand what your code below does.

You are saying that if the var vAbort = 1 the program will BREAK.  Then the 
next command after the ENDWHILE is

If vAbort = 1 then
   Return
Endif

This will stop the EEP and go back to the form.  Is this correct?

Jim

________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Dennis McGrath
Sent: Wednesday, August 12, 2009 3:01 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: WHILE LOOP

I assume from what you are saying that under certain conditions your want you 
WHILE loop to terminate and immediately exit from the EEP.
One could RETRUN from within the WHILE loop but this might not be a good idea.

I would do this:

Set var vAbort INT = 0
While......
   If condition then
      Set var vAbort = 1
         Break
   Endif

    --- code here

EndW

If vAbort = 1 then
   Return
Endif

--more code

RETURN


________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Jim Belisle
Sent: Wednesday, August 12, 2009 2:50 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - WHILE LOOP

I am going to use an EEP in a bit button that contains a WHILE loop. According 
to the HELP information, it is best not to use a GOTO statement.  I know I can 
use the EXIT code but I do not want the session to completely end.  Also if I 
use the BREAK command, the WHILE loop is broken but the code continues to run. 
I just want the EEP to end and go back to the Variable form that has the button 
located on it.  What is the best command to use?

Jim

As you can tell, I am unfamiliar with many of the programming commands.  Just 
learning a few new things at a time.

Reply via email to