nemoBasic
nemo (145) 2496 posts |
For anyone interested in my development of BBC Basic, there’s a page here It is not currently available for download though. |
Rick Murray (539) 13751 posts |
Looks like a pretty interesting set of changes there. <reads> WTaF? Local and errors and… Holy crap, I wonder how many weird and obscure bugs that has been responsible for through the years. |
nemo (145) 2496 posts |
And bear in mind that it applies to implicitly local vars as well as explicitly local, so this kind of thing is a Very Bad Idea:
Every time PROCsomething triggers an error, your Wimp block moves 8 bytes further through memory. Good luck. |
Clive Semmens (2335) 3274 posts |
Ummm. It seems to me that it’s just one example of a whole, huge class of things that are Very Bad Ideas, many of which one might get away with, some of them consistently, others (more worryingly) almost all the time. |
nemo (145) 2496 posts |
Something that is a good idea but 40 years too late is the ability to assemble code (or data) direct to file by setting O% to a file handle when using OPT4. Seems obvious when written down:
|
Michael Grunditz (8594) 245 posts |
That is really cool. |
nemo (145) 2496 posts |
Ta. I’ve used that a few times now to knock up a little Utility in a few lines. And this is as polymorphic as Basic gets, and is also really useful:
This decides mid-PRINT whether to display T% in hex or an empty column – featuring both IF and SPC in function form. This IF() is therefore polymorphic (loosely typed) – as is FN() of course – but though a polymorphic FN() can reasonably be used anywhere, a polymorphic IF() is only useful in PRINT[#] because Basic generally has strongly-typed destinations. I realise I am now modifying Basic to allow me to be even more terse. |
nemo (145) 2496 posts |
Side note: A polymorphic FN():
|