Martin T writes:
>> Now I want to process only the first three integers which are less
>> than 5. As I understand, for-each loop does not support breaking out
>> from the loop so I did it like this:

Yes, for-each lacks a break, but while can help.

>In addition, it would require a protection against an endless loop
>inside the while loop. Something like this:
>
>if ( $n > count($int_ns) ) {
>    set $m = 4;
>}

You can hang inside a while loop forever.  While that's not it's
goal, it's occasionally useful.

Thanks,
 Phil
_______________________________________________
juniper-nsp mailing list [email protected]
https://puck.nether.net/mailman/listinfo/juniper-nsp

Reply via email to