If I remember correctly you always needed to do a DIM or REDIM at some point before really using them.
But it is so long time ago and I never really used QBasic, by the time it came out I was already into Turbo Pascal, leaving Turbo Basic behind.
I did however spend long evenings trying to understand it, as QBasic was one of the first languages I tried to implement a compiler for.
Re:Show HN: Space Shooter in QBasic
by versteegen on Tuesday February 02, 2016 @01:20PM
(#11021240)
This code didn't DIM some of those arrays at all, and others were DIMed as integers instead of integer arrays! IIRC QB allows variables with different types to have exactly the same name, so I guess that's equivalent to not DIMing any of them.
I think I might remember something about a default size for undeclared arrays...
Re:Show HN: Space Shooter in QBasic
by Jean-Philipe on Tuesday February 02, 2016 @04:32AM
(#11018467)
Cool!
By the way: The PLAY command was acting as a pause hack, to limit the speed. It would just block the loop for a few milliseconds. Not sure there's an alternative, I think SLEEP was only for seconds...
http://pastebin.com/QrnvyVAH
Turns out it runs insanely fast, there's no speed control. It's also really hard to see in a tiny window.