Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is my Logic wrong or QB64's ?
#4
Because BASIC never had a "boolean" type, and because so many programmers relied so much on "0 is false, non-zero is true", I have come across this situation with being able to write a condition, but needing to execute something when that condition is false, and not caring at all about when it's true. Something like this:

Code: (Select All)
if x = 1 and y = 2 then
'do nothing
else
'a lot of code
end if

This is just an example but the condition could be a bit mind boggling. I simply do the "block if" and put "do nothing" comment on a line by itself. I do this programming in Lua as well. Even though in that scripting language, it's possible to assign a variable to "true" or "false" and the "if" statement responds to that. Smile
Reply


Messages In This Thread
Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 08:15 AM
RE: Is my Logic wrong or QB64's ? - by SMcNeill - 10-15-2023, 09:20 AM
RE: Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 10:38 AM
RE: Is my Logic wrong or QB64's ? - by mnrvovrfc - 10-15-2023, 11:24 AM
RE: Is my Logic wrong or QB64's ? - by SMcNeill - 10-15-2023, 11:39 AM
RE: Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 11:50 AM
RE: Is my Logic wrong or QB64's ? - by SMcNeill - 10-15-2023, 12:13 PM
RE: Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 12:21 PM
RE: Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 04:56 PM



Users browsing this thread: 7 Guest(s)