Talk:BASIC-PLUS

Merge?
See Talk:HP_BASIC_for_OpenVMS for merge discussion.

Command shell?
Someone just added the category "Command shells" to BASIC+. I'm not sure I agree.

While it is true that BASIC+ appeared to be a shell to the naive user, it was only processing those commands that were specific to the BASIC+ language, so "OLD", "NEW", "RUN", "SAVE", "COMPILE", and such-like. Other apparent commands that BASIC+ did not itself understand were kicked out to a system service that attempted to match the user's command to one of the known CCL (Concise Command Language) commands that had been defined on that particular system. (NB: I may have the processing order reversed: CCL may have had first-crack at the commands.)

So is BASIC+ really a Command Shell? Or is it just acting as a front-end to the CCL code which would be considered the real Command Shell?

Atlant 13:05, 14 August 2006 (UTC)


 * That's true, but how is that different from Unix shells? Things like DCL that thoroughly chewed everything you fed it are the exception. Paul Koning 11:01, 30 July 2007 (UTC)


 * Even that isn't really true always. In RSX, if DCL don't understand a line, it punts it to other bits of the system to have a go at it.
 * Sillbit (talk) 17:17, 13 December 2020 (UTC)


 * Also BASIC+ was not just an interpreter, it was a KBM (keyboard monitor). This meant that upon entry it HAD to determine if the system was just starting up, had crashed, if you were logged in or out, pass control to $INIT.* or $LOGIN.* (wildcarded because we never know WHO might be the Default KBM in the list of run-time-systems) before ever giving you a prompt.  Trap Handlers, Pseudo Keyboards, raising and lowering privledge and calculating how much memory we need to load a file is all done by the KBM (running in User mode).  After a command is entered, THEN .CCL is called (every time) before local commands are considered (that was the standard with most KBM's).  This is why you never created CCL's with the names new, old or print (try it).  The CCL's (Concise Command Lanugage) commands were a unique animal but really nothing more than a list of commands that could be run, stored in dynamic memory (FIP buffering). For most people (including myself), you wouldn't really think of BASIC+ as a command shell.  But by comparison, Unix shells are much easier to write than KBM's. Bbump 03:05, 13 August 2007 (UTC)


 * Small computers, like the Tandy 100 (a laptop with 24K of ram), used basic both as a script language and as a command intepreter. You could run programs from here, including programs encoded in machine code.  It really does not matter what command processor you use, in the end, it is the underlying OS (even in DOS), which loads the program.  --Wendy.krieger 09:06, 28 October 2007 (UTC)


 * I worked on RSTS-11 version 4B. When you logged in, you were in the BASIC interpreter, and that was that, there was nothing else you could be in.  Literally everything you did on the computer was

through that BASIC. So if that wasn't a command shell, then you're claiming that earlier RSTS didn't *have* a command shell. Which seems like nonsense to me. Details of how it was implemented are not really relevant.

Origin
While DEC took over BASIC-PLUS development, original development was done by EG&amp;H (Evans, Griffiths and Hart). Paul Koning 11:01, 30 July 2007 (UTC)

Misunderstanding FOR loops
It seems the writer of this article did not understand why FOR loops with conditional exit conditions existed.

It was always obviously easy to break out of any FOR loop. You could either change the loop variable to a value matching the exit condition (yes, that works even for a normal FOR loop), or even more obviously just GOTO out of the loop. The point of FOR ... UNTIL, or FOR ... WHILE was not because NEXT could not be in an IF statement, but because it allowed for totally arbitrary conditions for breaking out of the loop. They do not have to refer to the loop variable itself at all. And also, even in these loops, the loop variable itself is still managed the same as in any other FOR loop. No need to explicitly update the loop variable. It gets automatically updated at the NEXT statement.

So, you can write: FOR I=0 STEP 3 WHILE X=0 . . . NEXT I and it would loop until X was not zero anymore. Meanwhile, I was incremented by 3 for every iteration in the loop.

The example on the page is silly. FOR I=0 UNTIL I=10 is truly identical to FOR I=0 TO 9, and is just a more cumbersome way of writing it.

(Of course, one can also observe that strictly speaking, conditional exits were not needed either, as you could just create an IF statement in the loop, and GOTO out of the loop under the right conditions. However, in combination with statement modifiers, it becomes more relevant and useful.

Sillbit (talk) 16:41, 13 December 2020 (UTC)


 * I am not sure where the article says what you are saying above. It simply says that the UNTIL and WHILE could be used to modify its behaviour and that NEXT could not be used in a statement. Maury Markowitz (talk) 13:54, 13 May 2022 (UTC)

Corrections about statement modifiers
The article mentions statement modifiers, but does not really make clear why they are needed at all.

The statement is that PRINT "Foo" IF A=0 is equivalent to IF A=0 THEN PRINT "Foo"

They are not exactly the same. Compare the following two lines: 10 IF A=0 THEN PRINT "Foo" : PRINT "Bar" 20 PRINT "Foo" IF A=0 : PRINT "Bar" at line 10, the second print statement will only ever be considered if the IF statement is true. At line 20, the second print statement is independent of the IF, and will always be printed.

Sillbit (talk) 16:41, 13 December 2020 (UTC)

Statement separator
At some later point, BASIC+ changed from using colon as a statement separator to using backslash (\). Not sure exactly when this happened, but at some point colon ceased to even be accepted.

Sillbit (talk) 16:48, 13 December 2020 (UTC)

RSTS
The article consistently refers to RSTS/E, but that is not correct. In particular, BASIC PLUS was *not* developed for RSTS/E. RSTS started out as RSTS-11, and that's what BASIC PLUS originally ran on. RSTS/E came later.
 * There is only one article on this OS, as seen in the lede, it covers both -11 and /E. Maury Markowitz (talk) 13:56, 13 May 2022 (UTC)