OK, first of all, I am not a programmer. (yes, I heard the “thank god”) Perhaps I could make the top example simpler.

But anyway, I kind of like goto too much. I find it more intuitive to just jump around and re-use parts rather than think about how to do loops without too much nesting.

In high school, we only did Python. I really wanted to do goto in Python as well, but all I found was this April fools’ goto module.

Now in college we’re starting with C, and I am starting with Bad HabitsTM.

Anyway, tagging every line was BASICally just for the joke, but it is useful to just jump to any random line.

  • notabot@piefed.social
    link
    fedilink
    English
    arrow-up
    16
    ·
    2 days ago

    It’s always fun to get your offset slightly wrong, and jump into the middle of an instruction.

    • Quantenteilchen@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      ·
      22 hours ago

      Oh but only on fully built arm cores which support both thumb and the other mode!

      That way all you instructions the debugger shows will be wrong as well since you will have swapped asm mode. (This should, however, fix some off by one jumps because the core should adjust the address. The nice change will continue wracking havoc so not much is lost…)