06-07-2022, 09:58 PM
Hi Vince ... not a fan of more logical operators...Some of the stuff I've floated here are more a short cut to the language then they are advancing the syntax with something new. Like the V and inverted V instead to typing OR or AND. Perhaps the double ?? for LPRINT is also a corner cutting time saver, and really, are we getting that lazy ( I am ).
But I'm not sure more logical operators wouldn't be helpful. When I write a statement with logical operators I see the words (OR, AND, XOR, NOT etc) and not the truth table which underlays the actionable part of the statement. It's typically the reason why I make so many mistakes especially with IMP.
Here's an example statement with logical operators which I see as correct but it's not
IF a = 5 AND b = 6 AND c = 5 THEN c = a
PRINT c
This prints zero, when it should print -1. Here is where I was thinking a THEREFORE function may help. Instead of THEN use THEREFORE to make the statement TRUE in verse as well as TRUE (-1) in the Logic process.
AndAlso & OrElse sound cool. I haven't heard of them before. Always something new under the sun.
But I'm not sure more logical operators wouldn't be helpful. When I write a statement with logical operators I see the words (OR, AND, XOR, NOT etc) and not the truth table which underlays the actionable part of the statement. It's typically the reason why I make so many mistakes especially with IMP.
Here's an example statement with logical operators which I see as correct but it's not
IF a = 5 AND b = 6 AND c = 5 THEN c = a
PRINT c
This prints zero, when it should print -1. Here is where I was thinking a THEREFORE function may help. Instead of THEN use THEREFORE to make the statement TRUE in verse as well as TRUE (-1) in the Logic process.
AndAlso & OrElse sound cool. I haven't heard of them before. Always something new under the sun.