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
 Menu using Switch Command

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
Mulvenna Posted - 08/05/2013 : 02:47:42 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 08/06/2013 : 11:57:39 AM
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);
}

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