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
   
#yiv0870360102 #yiv0870360102 -- _filtered #yiv0870360102 {panose-1:2 4 5 3 5 4 
6 3 2 4;} _filtered #yiv0870360102 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 
3 2 4;}#yiv0870360102 #yiv0870360102 p.yiv0870360102MsoNormal, #yiv0870360102 
li.yiv0870360102MsoNormal, #yiv0870360102 div.yiv0870360102MsoNormal 
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}#yiv0870360102
 a:link, #yiv0870360102 span.yiv0870360102MsoHyperlink 
{color:blue;text-decoration:underline;}#yiv0870360102 a:visited, #yiv0870360102 
span.yiv0870360102MsoHyperlinkFollowed 
{color:purple;text-decoration:underline;}#yiv0870360102 
p.yiv0870360102msonormal0, #yiv0870360102 li.yiv0870360102msonormal0, 
#yiv0870360102 div.yiv0870360102msonormal0 
{margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-serif;}#yiv0870360102
 p.yiv0870360102aolmailmsonormal, #yiv0870360102 
li.yiv0870360102aolmailmsonormal, #yiv0870360102 
div.yiv0870360102aolmailmsonormal 
{margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-serif;}#yiv0870360102
 p.yiv0870360102aolmailmsochpdefault, #yiv0870360102 
li.yiv0870360102aolmailmsochpdefault, #yiv0870360102 
div.yiv0870360102aolmailmsochpdefault 
{margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-serif;}#yiv0870360102
 span.yiv0870360102aolmailmsohyperlink {}#yiv0870360102 
span.yiv0870360102aolmailmsohyperlinkfollowed {}#yiv0870360102 
span.yiv0870360102aolmailemailstyle17 {}#yiv0870360102 
p.yiv0870360102aolmailmsonormal1, #yiv0870360102 
li.yiv0870360102aolmailmsonormal1, #yiv0870360102 
div.yiv0870360102aolmailmsonormal1 
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}#yiv0870360102
 span.yiv0870360102aolmailmsohyperlink1 
{color:#0563C1;text-decoration:underline;}#yiv0870360102 
span.yiv0870360102aolmailmsohyperlinkfollowed1 
{color:#954F72;text-decoration:underline;}#yiv0870360102 
span.yiv0870360102EmailStyle26 
{font-family:sans-serif;color:windowtext;}#yiv0870360102 
span.yiv0870360102EmailStyle29 
{font-family:sans-serif;color:windowtext;}#yiv0870360102 
.yiv0870360102MsoChpDefault {font-family:sans-serif;} _filtered #yiv0870360102 
{margin:1.0in 1.0in 1.0in 1.0in;}#yiv0870360102 div.yiv0870360102WordSection1 
{}#yiv0870360102 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.

Reply via email to