Re: FOR lists
Posted: Sun 10 Nov 2019, 12:31
If Python is as easy to setup as BB4W and as dynamic with trail and error approach as the BB4W IDE, I would like to give it a go.
for the Windows, Linux (86), Mac OS-X, Android, iOS and Raspberry Pi editions of BBC BASIC
You were wrong and I was right. I don't call that "common knowledge"!
So you're suggesting that each new version of the interpreter could have a number of 'compatibility modes' in which it can emulate every previous version of the interpreter, according to something found in the BASIC program. Do you realise how impractical that is, the amount of extra code in the interpreter it would imply, and the likely overhead in execution time?Probably too late to implement it, but one solution to the problem of programs failing would be to have a BB4W version number in the program. If it was compiled with 6.12 then LOOP or NEXT could be interpreted in one way, if with v. 7.20 then those words could be interpreted in another way.
OK, but that doesn't solve the compatibility issue. The program still doesn't run, and the person running it is faced with a choice of either modifying the program or somehow getting hold of a copy of an old interpreter which will run it. Neither may be practical, especially if he is not the program's author. All your proposal would achieve is to make it easier to discover why the program doesn't run, but although that is of some value it doesn't of itself solve the problem.
Being a moderator gives you a unique opportunity of replying immediately after every post of mine is published, so whether or not it is with the "thought" of having the last word that is the practical consequence. It seems to me, as (I believe) the sole moderated member of this forum, that I am being doubly disadvantaged: my posts get delayed (I realise that is unavoidable) but also it appears to the casual reader that the validity of everything I assert is in doubt.Incidentally, I post my replies as me, not as moderator (or assistant mod, to be pedantic), and it is with no thought of "having the last word"
Right now there's a lot going on in the real world that precludes me spending a lot of time on something that might be used a little, if at all, to implement it it Matrix Brandy. On the flip-side, there is only one implementation to worry about (C) so don't have to worry about a second, parallel implementation in assembler or something else!RichardRussell wrote: ↑Fri 08 Nov 2019, 16:54Noted. As you may have seen, I raised the issue at StarDot (where there is probably a deeper BBC BASIC knowledge base than here) and the reactions so far have been universally positive. The author of Matrix Brandy has already expressed an interest in implementing it in that dialect of BBC BASIC, and history suggests that he may not take very long!
So the cat is well and truly out of the bag. Whether I commit to implementing it in BBCSDL or not, there may well be a version of BBC BASIC with that functionality quite soon, and that may force my hand.
At StarDot it has been pointed out that there's no need for a keyword here at all. The syntax could simply be:
Code: Select all
FOR I% = 3, 22, -9 NEXT FOR Day$ = "Mon", "Fri", "Sun" NEXT and perhaps: FOR I% = list%() NEXT
Code: Select all
I%() = 3, 22, 9 Day$() = "Mon", "Fri", "Sun" I%() = list%()