Jim:  It was confusing to me, but I think Dan is actually typing the error 
message that HE is getting when he has his problem.  I think his error message 
is saying that it can't find the endif and the endwhile in HIS code, which 
makes sense because jumping out of a while loop with a goto would make it 
"lose" those crucial "end" commands.  Which of course usually leads to a memory 
leak problem and cause all kinds of weirdness.

Karen

 

 

 

-----Original Message-----
From: 'jim schmitt' via RBASE-L <[email protected]>
To: rbase-l <[email protected]>
Sent: Mon, May 7, 2018 3:28 pm
Subject: Re: [RBASE-L] - using goto labels in while loop



Hi, Dan:


Karen's example does have a matching ENDIF, just above the ENDWHILE command.  
Her ENDWHILE closes the loop.
Everything looks OK to me in her example.


Jim Schmitt


  
 
 
  
 From: Dan Goldberg <[email protected]>
 To: "[email protected]" <[email protected]> 
 Sent: Monday, May 7, 2018 4:05 PM
 Subject: RE: [RBASE-L] - using goto labels in while loop
  
 



Thx. Just don’t know why it sometimes throws an error when tracing. It says 
something like an endif or while block not closed
 
  
 
Your command file contains an IF...THEN command line without a matching ENDIF, 
a SWITCH without a matching ENDSW or a WHILE...THEN command line without a 
matching ENDWHILE. Enter ENDIF, ENDSW or ENDWHILE to close the loop.
 
  
 
But they are all in there. I will keep checking.
 
  
 
BTW,  I like the parameter passing idea from inside the while loop.
 
  
 
Dan Goldberg
 
  
 
From: karentellef via RBASE-L <[email protected]>
Sent: Monday, May 7, 2018 11:56 AM
To: [email protected]
Subject: Re: [RBASE-L] - using goto labels in while loop
 
  
 
It's okay to move around inside of a while loop, but never to take yououtside 
of the while loop.

If I need to do something like that, I would:

while 1 = 1 then
   If <something> then
      set var vAction = 'quit'
      break
   endif

endwhile

set var vAction text
If vAction = 'quit' then
  goto somewhereelse
endif


Karen
 
  
 

  
 

-----Original Message-----
From: Dan Goldberg <[email protected]>
To: rbase-l <[email protected]>
Sent: Mon, May 7, 2018 1:41 pm
Subject: [RBASE-L] - using goto labels in while loop
 

Is using goto label commands not a good idea inside while loops?
 

 
 

I was tracing a command file and noticed it would give me an error.
 

 
 

TIA
 

 
 

Dan Goldberg
 
--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
[email protected].
For more options, visit https://groups.google.com/d/optout.
 

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
[email protected].
For more options, visit https://groups.google.com/d/optout.
 


-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.




 
 
  

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.


-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to