Menu

Pseudo-boolean variable

Help
2019-11-19
2019-11-19
  • Bertrand BAROTH

    Bertrand BAROTH - 2019-11-19

    Since there are no boolean variables in GCB, I think the best way to simulate them would be the use of a byte variable. But :
    1 ) Is it correct to assign the value "True" or "False" to such variables (it compiles ... ) ? Or should I rather use 1 and 0 instead ?
    2) And how should the test look like ? In former Basic versions (Commodore ... ) an integer variable was considered as True if non equal to 0. So, should I use "If (Test)" or "If (Test = True)" or rather "If (Test <> 0)"
    Thanks for any answer ...

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.