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
 Menu using Switch Command
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Mulvenna

Germany
46 Posts

Posted - 08/05/2013 :  02:47:42 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I am working with a piece of code that a predecessor of mine has written and I am tasked with minimizing it's run time.

I am trying to build a user operated menu to select which parts of the code are actually REQUIRED to run instead of running the entire script every time (currentlz takes about 25 mins).

Is it possible to split the script up into various .ogs files and use a switch command to call different script files depending on the user input?

Any help would be much appreciated, I'm kind of a novice at this.

Thanks,
Mulvenna

greg

USA
1378 Posts

Posted - 08/06/2013 :  11:57:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can put all your code in multiple [Sections] of one OGS file, or put each separate code into separate OGS files...

%A = (Test Procedure 1) (Test Procedure 2) (Verification Test);
iSelect = 1;
getn (Select) iSelect:A (Run Test Code);
switch(iSelect)
{
case 1:
run.section(All Code,Test Procedure 1); // One OGS file
// run.section(Test Procedure 1,Main); // Multiple files
break;
case 2:
run.section(All Code,Test Procedure 2);
// run.section(Test Procedure 2,Main);
break;
case 3:
run.section(All Code,Test Procedure 1);
run.section(All Code,Test Procedure 2);
// run.section(Test Procedure 1,Main);
// run.section(Test Procedure 2,Main);
}
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