0 Members and 4 Guests are viewing this topic.
In cases like this though, it could make the compiled size smaller if you are using enough options, because it can use a table of jumps instead of a bunch of, well, if statements
Quote from: calc84maniac on April 11, 2010, 12:56:48 amIn cases like this though, it could make the compiled size smaller if you are using enough options, because it can use a table of jumps instead of a bunch of, well, if statementsRight, its much more efficient in an assembly program to do switch statements than a bunch of if statements.Unfortunately, it would be way too hard to automate this into the parser since its not just simple templated code. It would have to check all the conditions in the beginning (non-linear parsing) and then create a jump table to each of the switch labels. It's just way too complex to code and it would need a lot of extra memory. I mean I could just do it as something that just makes it "easy on the eyes" but I don't feel like its worth the extra effort. ElseIf statements should take care of this for the most part anyway.
Hmm...I can't really see the purpose of this command...What are the benefits of having this over saying If A=0:End, etc... ?
Does the parser support conditional form:While (A=0)(B=0)(C=12)cuz i use that alot now.