Richard saw this when it got cross-posted to the group.io discussion group, and emailed me the following, which he is happy for me to post here. I hope it will clarify the situation for everyone. You might want to take note of the comments later on that a syntax checker has to handle VALID code correctly, but that behaviour with invalid code is not (always) determined, and that interpreted languages do not usually do syntax checking for coding errors.
I've posted it verbatim: regular users of the forum will be aware that Richard has strong views and can express them more forcefully than I would encourage others to do, but since this is essentially a support forum for his product, I think it appropriate to allow him some extra latitude.
Best wishes,
D
STOS> I totally understand the reason for the behaviour, the problem (to
put it bluntly) is that this dialect of
STOS> BBC BASIC doesn't follow the syntax of "real" BBC BASIC.
Needless to say I resent any suggestion that my implementations of BBC
BASIC are any less "real" than Sophie's. They are contemporary with
hers (I was already working on BBC BASIC Z80 in mid 1981) and in my rôle
at the BBC I had more responsibility for the language specification than
anybody at Acorn!
It is of course true that the BBC's specification of the language left
plenty of details open to interpretation, and inevitably the 'Wilson'
and 'Russell' strands diverged slightly as a result (sometimes through a
deliberate decision to do things differently, sometimes by accident) but
they are both BBC BASIC.
It's worth noting that Sophie made some changes in ARM BASIC V which
introduced incompatibilities with the earlier 6502 BASICs, that I
consider to have been unwise and which I never adopted in mine. To that
extent my BASICs are more similar to the original BBC Micro BASIC than
Sophie's, should ARM BASIC V therefore not be called 'BBC BASIC'?
STOS> A mis-placed space in someones source code can cause a headache
catching a stupid error which SHOULD
STOS> be picked up by the parser/lexer and throw a syntax error like
original BBC Micro, Acorn v5, Matrix Brandy etc.
I disagree. As a general rule interpreted languages don't do any syntax
checking purely for the purpose of detecting coding errors, since this
adds an overhead at runtime which hits performance. The only errors
they detect and report are ones which result in the interpreter not
being able to make sense of the code, and so prevent execution continuing.
END PROC is not in that category, END is a perfectly valid statement and
(unlike QUIT) takes no parameters, so it is valid for the interpreter to
conclude that the intention is for the program to terminate, so it does
(without any error being detected).
> Surely the syntax of a language should be paramount if it is
replicating an existing specification.
The syntax of a programming language tells you only about *valid* code,
that is it tells you what code which adheres to that syntax should do.
But it says nothing at all about what should happen in the case of code
which does *not* adhere to that syntax. There is no implication that an
error should be reported, that would require a full syntax checker,
something which no interpreted language has.
So code which does not adhere to the language syntax can legitimately do
*anything at all*. You can't complain if code containing a particular
mistake behaves different in one BBC BASIC dialect compared with
another, that is entirely to be expected (indeed is virtually inevitable
unless the interpreters themselves are identical).
STOS> I'm sure this is just a bug and Richard may fix it if he deems it
important.
It's not a bug and nothing is going to be changed.