• ignirtoq@feddit.online
    link
    fedilink
    English
    arrow-up
    2
    ·
    15 days ago

    I’m not super familiar with BASIC. Can you explain how the definition of One works? If variables have random values when declared but not set due to memory garbage, I would expect ZeroBit to be “true” half the time and “false” the other half. When it’s false, I can reason through it, but when it’s true I don’t see it. I imagine it has something to do with the details of ABS()?

    • over_clox@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      15 days ago

      Different BASIC dialects work differently, you’re absolutely right to ask.

      Honestly, the ZeroBit code part is the hack within Mobile Basic, it always returns Zero, meaning the ABS(NOT(ZeroBit)) will always return One