The answer by @Raffzahn is close, but it has at least one important detail wrong: the total length of the token names has nothing to do with it.
The following facts all all relate to the issue.
Commodore Basic (any Microsoft Basic really) stores programs in a tokenized form in memory. That means here that all Basic keywords are replaced by a single byte, ...
MS-BASIC is for many parts modelled after DEC's PDP-11 BASIC. And PDP-11 BASIC is as well quite related to ECMA-55 Minimal BASIC, so as usual when talking about old BASIC details a look at the fine crafted ECMA-55 specification is helpful.
For PRINTing of number is notes:
Numeric-expressions shall be evaluated to produce a string of
When I did my MS basic clone I found I needed the trailing space on numbers and a leading space if the number wasn't negative.
Looking at the tests I wrote STR$ always puts a leading space in.
I think I ended up testing with a UK101,Pet,Apple and CP/M version of MS basic in the end.
INPUT with comma vs. semi
I'm not sure what this is supposed to ask, but ...
According to the GW-BASIC documentation, a semicolon between the INPUT prompt and the variable suppresses the question-mark prompt.
I do not believe this was the case on the Apple or PET/C64,
It was on the Apple and all other MS-BASIC versions, but not on the PET.
The comma syntax does not work in Commodore BASIC, neither on the PET (Commodore BASIC V4.0), nor on C64 (Commodore BASIC V2.0), C16/116 (Commodore BASIC V3.5) or Commodore 128 (Commodore BASIC V7.0). Using a construction like INPUT "ENTER SOMETHING",A$ yields a SYNTAX ERROR. There are however other ways to suppress the question mark prompt on a C64, see the ...
To further confuse the issue, both ANSI/ECMA BASIC standards, in their minimal and full implementations, do not allow simple scalars an arrays to have the same name. This from ECMA-55: Minimal BASIC, page 9:
The same letter shall not be the name of both a simple variable
and an array, nor the name of both a one-dimensional and a two-
I propose that Dartmouth's implementation of BASIC should be regarded as definitive, since they invented the language.
In Dartmouth BASIC, A and A() were distinct variables.
The single letter denoting a list or table name may also be used to
denote a simple variable without confusion.
(In this context, "list" is a 1-dimensional array, "table" is a 2-...
It depends on your BASIC. Some Basic distinguish between arrays and simple variables, some don't.
MS-BASIC, Sinclair's ZX81 and many other separate them.
Similar for simple variables, some BASIC distinguish between simple varables of different type. So A, A$, A! and A% are different variables.
The workings come from the way variables are searched. The ...
They're two different variables, at least in the version of MS BASIC on the C64:
PRINT A, A(1)
A = 1
PRINT A, A(1)
Basically A and A(...) refer to two different variables, just like A$ and A% are also different variables than A.