swzoh wrote: > --- In [email protected], bizaro <[EMAIL PROTECTED]> wrote: >> Hello Bruce, >> >> you wrote... >> >>> Beta 4.5.05 is available at >> Thanks. >> >> >> Following returns an error, >> ----script---- >> Local i >> >> For (i = 0 ; i < 1 ; i = i + 1) >> >> If (1) Do >> Jump J >> EndIf >> >> @J >> Win.Debug("test") >> >> EndFor >> ----script---- >> >> But following does not, >> ----script---- >> Local i >> >> For (i = 0 ; i < 1 ; i = i + 1) >> >> If (1) >> Jump J >> >> @J >> Win.Debug("test") >> >> EndFor >> ----script---- >> >> Bug or my stupidity? > > I don't think it's a bug. Since If()Do-EndIf is nested inside > For()-EndFor, PP should expect to meet EndIf before EndFor. In your > example, reached EndFor without ever passing through EndIf. So, PP may > think it written as: > > For() > ... > If()Do > ... > EndFor > ... > EndIf > > which is of course incorrectly nested. >
and that code looks like a mess to me. using jump like that is plain silly when the proper way would be to put the win.debug inside the if()do-endif that is unless one is thinking about jumping past something that should not trigger if the if() triggers, but then i would nest it inside a second if() with a condition thats the reverse of the first if(). jump can be nasty, realy nasty. dont use them unless there are no other way. and most often there is another way ;) Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
