Adding more Logical Operators
#8
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.
Reply


Messages In This Thread
Adding more Logical Operators - by Dimster - 05-21-2022, 08:05 PM
RE: Adding more Logical Operators - by Dimster - 06-02-2022, 12:47 PM
RE: Adding more Logical Operators - by Dimster - 06-05-2022, 01:03 AM
RE: Adding more Logical Operators - by vince - 06-06-2022, 11:14 PM
RE: Adding more Logical Operators - by Dimster - 06-07-2022, 09:58 PM
RE: Adding more Logical Operators - by madscijr - 06-13-2022, 07:19 PM
RE: Adding more Logical Operators - by madscijr - 06-13-2022, 07:01 PM
RE: Adding more Logical Operators - by madscijr - 06-14-2022, 03:52 AM
RE: Adding more Logical Operators - by madscijr - 06-14-2022, 06:59 PM
RE: Adding more Logical Operators - by madscijr - 06-14-2022, 07:58 PM



Users browsing this thread: 2 Guest(s)