LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

12 what

Root / Programming Questions / [.]

MZ952Created:
r=COMMON DEF D() ...
What's going on here.

oh darn I forgot I left that in' aw alright I guess I'll explain it lol so, I needed R to be a global variable (it keeps track of the read position in the microphone buffer, so needs to keep its value between function calls) it's never actually used outside that function, though, so I needed to just put it somewhere so it exists. Normally you'd just use VAR R, but to save space I usually use either R=0 or ?R Earlier I realized that, if the code never runs, R= works too. Which can save space because you can write R=DEF ... vs ?R:DEF ... it's not *really* r=COMMON DEF D() ..., it's just
r=(null)
COMMON DEF D() ...
which IS valid syntax, but will give an error if it tries to run, since you're not allowed to assign null to a variable (basically it's just a special type mismatch error) Anyway, originally I just USEd slot 1, so this was fine, but pretty soon I switched to EXEC so I could put some extra code outside the function, and I switched it to R=0 Then at some point I tried out R= again, and then forgot to switch it back lol ...wasted like 3 characters because I needed END to stop it from running... oh well