Basic
Shelley Powers: I started with BASIC. Contrary to popular myth, that’s B-A-S-I-C, which stands for: Beginner’s All-purpose Symbolic Instruction Code. However, the language is now usually given as just ‘Basic’
My first language was BASIC too. Ah, it is fun to reminisce.
Shelley must have used a later version than I did. In earlier versions, assignment statements required the word “LET”, DIM was exclusively for arrays, IF statements were followed by either one to three line numbers, no “THEN GOTO”, it was either “THEN” or “GOTO”, but it meant the same. Oh, and expressions in PRINT statements were separated by semicolons.
Most of these restrictions were lifted in languages like Visual Basic (note: Basic, not BASIC) that, among other things, allowed identifiers that consisted of more than a single letter optionally followed by a single digit optionally followed by a dollar sign.
Oh, and everything was always in ALL CAPS. It was like all programs were YELLING AT YOU.
The best example I remember of spaghetti code is, quite aptly, a program that created mazes.
The syntax you are speaking was in use on Spectrum family microcomputers BASIC implementation,
Nice convenience was you didn’t have to type like those days ;-) every key on keyboard produced (almost) proper to the syntax context keyword when pressed. In those times ‘spaghetti code’ term didn’t exist probably ;-)
RANDOMIZE USR 0
Posted by Adam Kruszewski atMost of the restrictions you mention were actually lifted well before VB came along, but only for those lucky enough to be using Dartmouth BASIC 7 or one of the few implementations of the ANSI standard that finally came along in the mid 80s. Before — and even after that — there were loads of really bad implementations that went in every which direction, so it’s hard to tell how old a verison of BASIC is from its features. The ampersand for string concatenation (in any expression, not just PRINT statements) dates back at least to Dartmouth BASIC 6 in the mid '70s. It probably goes back farther, but that’s as far back as I can attest to personally. Semacolon was still valid in PRINT statements, as was comma (for tab-separated output).
Posted by Richard Schwartz at
As a little 9th grader I visited my brother for two weeks the summer of 1963 who was going to Dartmouth and there I was introduced to and ran BASIC on the GE 235 Timesharing System there - ahhh, the clickity-clack of the ol' teletype on that yellow newsprint roll of paper in all CAPS brings back great memories.
Posted by Brian Watt at
Dijkstra, Dutch scientist “goto considered harmful” once said:
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration”.
Posted by m.j.milicevic at
GWBASIC was my first language and I’ve always kind of resented Dijkstra’s statement.
Posted by Bob Aman at
Ah yes BASIC. the basic on the BBC microcomputer, while it allowed for IF THEN GOTO, railed against it. All of the training materials provided made it very clear that using GOTO led to spaghetti code - instead define a subroutine and use GOSUB...
and understand that not only was this a PC manual - but also a training manual for programming in British schools, with associated national TV programming. I am inclined to think Djikstra was being rhetorical.
Posted by James Governor atThe Basic’s targetted at DOS — Microsoft’s QuickBasic and their PDS product, TrueBasic, Borland’s TurboBasic etc. — were more akin to the Pascals of the day than to early line-numbered BASIC. I still miss how they handled strings, and have sometimes wished someone would have rolled some of that capability into HTML.
Posted by billg at
The behavior of LET and DIM et al really varied on the dialect.
One of the more challenging tasks I encountered, for example, was translating programs written for Altair BASIC to be used on my Sinclair ZX-81. Having never programmed in Altair, that was a bit of a challenge :-)
Posted by Jeff Grimmett at
The killer app for BASIC (when I was 8, at least) was that it only took 2 lines to make curse words scroll endlessly down the screen.
Posted by Ross M Karchner at