We all make mistakes. One early mistake I made was copying (partly) the old thing in Microsoft BASIC where you didn't have to declare variables at all.
If you do this in Microsoft BASIC it will just print "0" ; the default value, as do versions prior to 0.93
It now requires you to declare variables. There are three ways to do this - an assignment statement, a LOCAL statement, and as a procedure parameter. (Well, four if you include DIM, but that's something different).
Running the games so far shows why. Most worked fine. Asteroids didn't, because the RPL code that does the movement and collision checks accessed variables that didn't exist. There were a couple of mistakes - a game that should have been a game.score , but didn't matter because it was initialised to zero. Pacman had one mistake. Everything else works ... I think :)
I might make it optional again, but I probably won't. It's like GOTO GOSUB and RETURN. They're there ; RENUM ignores them to discourage you, really it's just for type-ins. I seriously considered disable the tokeniser code for those three.
So next up ; the Sprite microlanguage, a sort of high level compiler, and inline documentation for RPL words. The high level compiler is based something I've done before, it's very simple and clean and designed round the architecture of the machine.
Tuesday, 5 May 2020
Subscribe to:
Post Comments (Atom)
Breaking change
We all make mistakes. One early mistake I made was copying (partly) the old thing in Microsoft BASIC where you didn't have to declare ...
-
I'm quite surprised. I actually am finding doing this rather, well, boring. It's a bit like manually translating a foreign langu...
-
Found a bug. Well, a couple of bugs, one silly, one not. The silly one was an error in the tile command, but the not silly one is to do with...
-
This game is not slightly based on "Sabre Wulf" So this is coming along okay though I haven't done a huge amount on it yet...
No comments:
Post a Comment