News for hackers. Stuff that matters.
Re:Serverless QBasic by knz42 on Monday July 16, 2018 @03:48AM (#17539479)
The suggestion to "use SYSTEM instead of END" is suspicious.

SYSTEM spawns the system shell as a sub-process. If one would EXIT from the spawned command.com/cmd.exe, QBASIC would pop up back. I think a user of programs written in this way would find themselves surprised.

Re:Serverless QBasic by iforgotpassword on Monday July 16, 2018 @04:14AM (#17539575)
This is not true, system quits basic. In gwbasic this was unconditional since there was no ide, in qbasic it works if you used /run to start the program right away, otherwise system is equivalent to end and just drops you back into the ide.
Re:Serverless QBasic by psuter on Monday July 16, 2018 @07:41AM (#17540473)
It was definitely a little confusing, as there seems to be many ways of exiting. From the QBasic docs in the IDE:

END: Ends a program, procedure, block, or user-defined data type. [...] If no argument is supplied, END ends the program and closes all files.

STOP: Halts a program.

SYSTEM: Closes all open files and returns control to the operating system.

You may be thinking of:

SHELL: Suspends execution of a Basic program to run a DOS command or batch file.

Re:Serverless QBasic by bitwize on Monday July 16, 2018 @12:44PM (#17542694)
SYSTEM with no arguments exited BASIC.

SYSTEM with a string argument on some Microsoft BASICs spawned a shell that ran the command in the argument. On others, the SHELL command did this. (iirc mbasic on xenix used SHELL, GWbasic used SYSTEM with an argument.)