Playing with the mouse
#6
@TempodiBasic

Che piacere vederti my friend from Italia!

Thanks for the better explanation. Boolean logic is not a must for programming, but it can make certain jobs, like in this neat mouse example, easier to code.

I want to get some more info on the SAME vs EQUALS above the bitwise comparison vs numeric values. For instance...

Code: (Select All)
DIM AS _UNSIGNED _BYTE a, b
a = 2
b = 4
PRINT a EQV b, a = b

So a EQV b is -7 in this example. I do not work with bits so I don't see how that -7 result was calculated.

I'll probably find uses for this EQV keyword in my code now, just like I did with SGN(). Funny, I actually found some code from several years ago that I did use SGN() in, but then forgot about it. I even forgot this was a Keyword of the Day I read less than 2 weeks ago. I mean isn't aging great?... Sure, if you're a damn bottle of wine! Oh well...

Note: Similar for strings in JAVA ==, which can work with strings and differentiates how the string was made. For instance, == is False for a$ = "Pete" b$="P"+"e"+"t"+"e" a$ == b$ is FALSE, while a$ = b$ is TRUE. Just saying.

Pete
If eggs are brain food, Biden takes his scrambled.
Reply


Messages In This Thread
Playing with the mouse - by NasaCow - 12-11-2022, 07:59 AM
RE: Playing with the mouse - by Pete - 12-11-2022, 02:47 PM
RE: Playing with the mouse - by NasaCow - 12-11-2022, 03:03 PM
RE: Playing with the mouse - by SMcNeill - 12-11-2022, 02:51 PM
RE: Playing with the mouse - by TempodiBasic - 12-11-2022, 03:10 PM
RE: Playing with the mouse - by Pete - 12-11-2022, 04:50 PM
RE: Playing with the mouse - by mnrvovrfc - 12-11-2022, 06:36 PM
RE: Playing with the mouse - by Pete - 12-11-2022, 06:39 PM
RE: Playing with the mouse - by TempodiBasic - 12-11-2022, 05:39 PM
RE: Playing with the mouse - by SMcNeill - 12-11-2022, 08:21 PM
RE: Playing with the mouse - by NasaCow - 12-12-2022, 09:38 AM
RE: Playing with the mouse - by TempodiBasic - 12-11-2022, 06:24 PM
RE: Playing with the mouse - by Pete - 12-12-2022, 12:22 AM
RE: Playing with the mouse - by TempodiBasic - 12-13-2022, 02:45 PM



Users browsing this thread: 1 Guest(s)