The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Break in linked .ogs script sections

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000