Joined: 09 Aug 2002
Location: Lewes, U.K.
|Posted: Tue May 04, 2004 8:51 am Post subject: Vectored Execution ... sort of
I've come up with a solution to speeding up the process deciding which part of the script should be executed from a large number of choices.
Say the script had to choose from 50 options you could put in 50 if...then statements and jump off from them. But what if your choice if the 50th then the script would have to do 50 tests which is a waste of processing time.
My solution is to use a list containing all the labels that are targeted and go straight to that item in the list and jump from there.
Please feel free to slag my script off as this is what usually happens when I post stuff on the forum.
Title Vectored Execution
DIALOG CREATE,New Dialog,-1,0,189,127
DIALOG ADD,BUTTON,BUTTON1,74,48,86,24,RUN SECTION
%a = @dlgtext(combo1)
%a = @pred(%a)
%b = @item(1,%a)
info Section 1
info Section 2
info Section 3
info Section 4