all 5 comments

sorted by: hot top controversial new old
[–] 4 points 5 months ago

Nice code golf challenge.

  • source
  • [–] 3 points 5 months ago (1 child)

    Technically Zero is 0-0 since One hasn't been set to anything yet.

  • source
  • hideshow 2 child comments
  • [–] [S] 5 points 5 months ago* (1 child)

    Indeed. But...

    If One was defined as random garbage, then still...

    Zero=One-One

    See my definition of One afterwards, it's a bit awkward, but works..

    Edit: Stop using digits, 0 is a digit...

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 5 months ago (1 child)

    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()?

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 2 points 5 months ago* (last edited 5 months 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

  • source
  • parent