T O P I C R E V I E W |
peter.cook |
Posted - 03/07/2002 : 10:11:34 AM Hi,
Can someone please clarify whether the following is a bug or expected?
Using the following script :
[section1]
loop(numa,1,5) { loop(numb,1,3) { if(numb==2) break; }; if(numa==3) break 1; };
[section2]
run.section(,section1); type -b "No break : numa=$(numa) numb=$(numb)";
run.section(XXXX.ogs,section1) breaks as expected no message.
However, run.section(XXXX.ogs,section2) does not cause a complete break in the script and the message 'No break : numa=3 numb=2' shows.
I would have expected break 1 to exit from all the current script as documented. If this isn't meant to be the case, how can I do this?
Cheers,
Pete |
3 L A T E S T R E P L I E S (Newest First) |
Mike Buess |
Posted - 03/07/2002 : 7:22:36 PM The technique outlined in the topic I referenced can also be applied here.
...But you're asking if there is a command that will halt script execution globally. I don't think so.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 03/07/2002 19:36:54 |
peter.cook |
Posted - 03/07/2002 : 11:14:18 AM That's what I assumed. So I guess there isn't a way to just halt all script execution then?
Pete |
Mike Buess |
Posted - 03/07/2002 : 10:42:22 AM 'current script' refers to the script in which the break 1 command appears, which in your case is [section1]. 'break 1' generates a command error which can be used as discussed in this topic.
Mike Buess Origin WebRing Member |
|
|