[Implemented] Stronger SELECT statement
[Implemented] Stronger SELECT statement
PB still requires you to use the SELECT ... CASE statements to come up with exact matches. You have to revert to IF ... ELSEIF ... statements if you want to check for greater than, less than, greater than or equal to, or less than or equal to conditions. The main advantage of SELECT, other than it lends some structure to your code, is that it allows you to designate one variable and test it against a number of possibilities, which should be faster than having to reselect the same variable over and over. But if you have to keep retesting against all the possibilites in a range (for instance, to determine if the variable N represents a capital letter, you would have to check it against 65 through 90, the ascii codes for "A" to "Z"), when just two possibilities should suffice: >= 65 AND <= 90, then you render SELECT as often being less effective than the standard IF clause. The opposite approach would be CASE < 65 and a CASE > 90, with the DEFAULT being from 65 to 90.
has-been wanna-be (You may not agree with what I say, but it will make you think).