|
Axe Software Forums
Quest Developer Forum Suggested addition to Quest===>
|
Author | Topic: Suggested addition to Quest===> |
Mega |
posted 16-11-2001 19:27 GMT
I noticed that QDK accepts only 2-step conditionals, not chained ones. In ASL terms, that means that it will accept this: if (condition) then {
if (condition1) then { "else if" doesn't work. The only way around it is to use "nested ifs" instead of chained ones. For example: if (condition1) then { As you can see, this gets annoying REAL fast, and it's very un-intuitive. Please include "if/else if/else" support for the next release :-) |
Mega |
posted 18-11-2001 20:25 GMT
Any thoughts? |
MaDbRiT |
posted 19-11-2001 17:13 GMT
Hi Mega I suggested a 'select case' option to Alex some time ago, and he put that on the to do list, I agree using nested 'if - then - else' is a messy business, 'select case' is easier to follow than chained/nested conditionals anyway. Al |
Mega |
posted 19-11-2001 19:41 GMT
You mean, sort of like a 'switch' statement in C++? That would be very useful, but 'else if' support should still be included, because some conditionals don't depend on the value of one variable. It may depend on the value of a string, or on two variables at once, etc. Switch statements couldn't handle those situations. |
MaDbRiT |
posted 19-11-2001 22:07 GMT
Yes Mega, that is the idea (though I hope we never get anything else in Quest as hideously unfriendly as C++ coding) Al |