Re: Testers wanted

Richard Russell

On Mon, Feb 12, 2018 at 06:26 am, J.G.Harston wrote:
Most expect that *Quit takes you back to somewhere where you can run another program, or to a caller.
I never use *QUIT (in fact I'd forgotten that the command even existed) because it's synonymous with the QUIT statement in BASIC.  In the official RISC OS manual for BBC BASIC the action of the QUIT statement is specified as "leaves the BASIC interpreter" which is exactly what it does in both BB4W and BBCSDL.

If the interpreter has been invoked from an IDE then it's reasonable that QUIT should return to the IDE, which again is exactly what it does in BB4W and the desktop editions of BBCSDL.  If it's been invoked from a command prompt, QUIT returns to the command prompt.  But when BBC BASIC has been invoked from the desktop QUIT returns to the desktop, and since it's the only way it can be invoked in Android that's what happens!

> It would be more useful if *Quit could be definable to do something specific to the platform

I don't see how it could ever do anything "different" from exiting the interpreter; you can't even assume that the interpreter is in a 'fit state' to do anything else (the QUIT might have been issued from a 'fatal error' handler). The responsibility for what happens after the QUIT properly belongs to the program that invoked the interpreter in the first place. In an ideal world the Android edition of BBC BASIC would work the same way as the desktop editions, in which the IDE runs as a separate process, but I've no idea how to do that or indeed whether it is even possible.

Quit takes me back to some unknown part of the filesystem

It doesn't take you "back" anywhere because Android doesn't have the concept of 'current directory'. That's why all paths need to be absolute (i.e. typically prefixed with @dir$, @lib$ etc.) in an Android-compatible BBC BASIC program.


Join to automatically receive all group messages.