How to control the loop within expect.



I just met a problem when I have a loop and an expect in this loop.
for example
for {set i 1} {i<10} {incr i} {
send a commanda
expect {
1 {puts 1}
2 {puts 2}
3 {........}
}
send a commandb
}
when I get the value 1, I will puts 1 and execute the commandb, so as
2.but my question is if I get the value 3, I want to continue the loop
but not execute send the commandb.
I've used break or exit , these all seemed exit the loop.
Do anybody knows this?
Thanks.

.



Relevant Pages

  • Re: How to control the loop within expect.
    ... when I get the value 1, I will puts 1 and execute the commandb, so as ... but not execute send the commandb. ... these all seemed exit the loop. ...
    (comp.lang.tcl)
  • Re: How to control the loop within expect.
    ... when I get the value 1, I will puts 1 and execute the commandb, so as ... but not execute send the commandb. ... these all seemed exit the loop. ... If the above example is actually what you are wanting (i.e. the loop condition ...
    (comp.lang.tcl)
  • Re: Infinite Loops and Explicit Exits
    ... > CS> One of these proposals relaxes the current restriction that an EXIT ... > termination of the loop is not visible at that point. ... > terminating condition is visible in that context. ... > You now want to allow this remote procedure, ...
    (comp.lang.cobol)
  • Safe multithreading in ASP.Net
    ... Code in global.asx Application_start subroutine, ... Dim emails As New ForumEmail ... Do While ContinueNotify 'boolean value set to True so loop will continue ... the thread still continues to execute. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: What is the difference between for..if, case statements, do..while
    ... ElseIf Then ... It can not execute both This and That or any ... Loop Until ... How does one decide which programming construct to use. ...
    (microsoft.public.excel.programming)