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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Break in linked .ogs script sections
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 03/07/2002 :  10:11:34 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Mike Buess

USA
3037 Posts

Posted - 03/07/2002 :  10:42:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
'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
Go to Top of Page

peter.cook

UK
356 Posts

Posted - 03/07/2002 :  11:14:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That's what I assumed. So I guess there isn't a way to just halt all script execution then?

Pete
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 03/07/2002 :  7:22:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000