04-08-2025, 04:14 AM
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.
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.