Posts: 2,546
Threads: 263
Joined: Apr 2022
Reputation:
142
I'm sure Steve would put me at....
CONSTANT Pete = PITA
Other than that, I'm good with the first one, although I'd write it with True as the top statement.
For fun, I've been using Not with _bit variables. The downside is debugging. It's flipping hard to tell, using that method, which value you're tracking, -1 or 0.
Pete
Shoot first and shoot people who ask questions, later.
Posts: 484
Threads: 95
Joined: Jul 2022
Reputation:
20
Good. One vote for choice #1..
Posts: 484
Threads: 95
Joined: Jul 2022
Reputation:
20
The polls have closed at 04/07/2025:
The result of all 2 people who have voted the results are:
1 vote for choice #1 and
a vote for none of the above.
Thank you for taking the time to vote for this very important topic..
Erik the votemaster.
Posts: 2,953
Threads: 348
Joined: Apr 2022
Reputation:
284
Chad, you're hanging again!
Posts: 2,546
Threads: 263
Joined: Apr 2022
Reputation:
142
04-08-2025, 03:39 AM
(This post was last modified: 04-08-2025, 03:40 AM by Pete.)
Well, it's like the old saying goes... "I'd rather be well hung than _byte size."
Pete
Shoot first and shoot people who ask questions, later.
Posts: 2,953
Threads: 348
Joined: Apr 2022
Reputation:
284
Looking at the original post, I'd have to say:
1) I'm with Rho. Just use _True and _False. They're built in the language now.
2) If one has to define a value themselves, then I prefer either of the first two methods. In basic True is always NOT FALSE, but FALSE isn't always NOT TRUE.
FALSE is *only* NOT TRUE when True is -1, but BASIC considers any non-zero value to be True.
2 is True. NOT 2 is.. -3. Which is also True.
0 is False. That's the only guarantee BASIC makes. Saying True = NOT FALSE will always be correct. Thinking FALSE = NOT TRUE is only correct in the limited scope of *IF TRUE = -1*. When dealing with CONST, there's nothing wrong with writing it as your third example does, with the exception that it reinforces the concept that False = Not True, which isn't a true statement all the time.
If one is going that route, then they could probably just use FALSE = _NEGATE True. Then that statement would always be valid and correct.
2 = True. _NEGATE 2 = 0. Which is, indeed, False.
A subtle difference, but one that I think if someone learned to adapt to, it might save them some issues later down the road. NOT TRUE can still sometimes be TRUE, but _NEGATE TRUE will always be FALSE.