On Mon, Jun 25, 2018 at 7:32 PM Phil Shafer <[email protected]> wrote: > > Martin T writes: > >Hi! > > > >Is there a way to terminate endless loop in SLAX? For example, if I > >configure something as simple as that: > > > >match / { > > <op-script-results> { > > while ( true() ) { > > terminate; > > } > > It's processing the terminate, but then it continues to "skip" over > the rest of the entries, thinking that it's a set of nodes instead > of a condition. So it really, really, quickly loops forever. Doh! > > I'll open a bug report and work on the fix. There is no workaround. > Apologies for the problem. > > Thanks, > Phil
Thanks Phil! So in short, at the moment "terminate" statement inside the while loop works in a way that when "terminate" statement is executed, then immediately next iteration of while loop is started if while expression returns true and this will loop infinitely? If this while expression returns false, then terminate statement was the last thing processed by the script and script exits. At least based on my tests it seems to work like that. Martin _______________________________________________ juniper-nsp mailing list [email protected] https://puck.nether.net/mailman/listinfo/juniper-nsp

