10 PRINT "60 years! How time flies"
20 GOTO 10
BASICally still alive: Classic language celebrates 60 years with new code and old quirks
May Day 2024 was the 60th anniversary of the BASIC programming language, and multiple FOSS BASIC-related projects released new versions in celebration. Three very different flavors of BASIC seem appropriate for a language that spawned more different and subtly incompatible dialects than any other – but at Vulture Towers we …
COMMENTS
-
-
Friday 3rd May 2024 20:50 GMT Anonymous Coward
LET X=X+1
As written on the black board by our Maths teacher who allowed us in at lunch time to have a play on the Commodore PET.
Given that he'd taught us Alegbra, it meant something completely different in this context, as he went on to explain.
I owe the roof over my head for him taking that time and effort.
Thank you Mr Sanker
-
-
-
-
-
-
Saturday 4th May 2024 12:27 GMT Dr Paul Taylor
Re: BASIC
No, "the determined Real Programmer can write FORTRAN programs in any language."
Real Programmers Don't Use Pascal, from DATAMATION, July 1983, pp. 263-265 (Readers' Forum).
-
-
-
Monday 6th May 2024 15:40 GMT osxtra
Re: BASIC
I still use it for Libre Office scripting. That and many other versions have acquired object capability (remember VB6?)
Haven't had to use GOTO or GOSUB for some years now.
One day, though, I will finally convert all that krufty LO BASIC code to Python ... just in time for the Next Great Language to come out, of course...
-
Tuesday 7th May 2024 00:07 GMT Bitbeisser
Re: BASIC
Well, it sounds as if you have never create a single, non-trivial program in BASIC.
Yes, there are a lot of BASIC spaghetti code programs out there, but in my experience, they are, specially in recent years, outnumbered by the badly designed Java, C++ or Python programs out in the wild...
-
Tuesday 7th May 2024 12:33 GMT ChrisC
Re: BASIC
Whatever your opinions of the language itself are, the way it made programming accessible to millions (by virtue of being right there as soon as you powered up your computer) in those heady early years of the home computing boom is, without any shadow of doubt, THE reason so many of us ended up following the career paths we did.
As much as I give credit to Sir Clive for making home computing affordable to me during that period of my life when my brain was eager to learn new stuff like that, had the Spectrum shipped either without any built in language, or with something far less easy to get going with than BASIC, then it'd have ended up being nothing more than a replacement for my old Binatone games console, and thus far, FAR, less of a revolutionary piece of kit than it actually was. So credit MUST also go to those responsible for having got BASIC to the point where Sinclair, Acorn et al chose to implement it.
The amount of code I've written in all the different dialects of BASIC I've used pales into insignificance compared with the amount of code I've written in other languages, but without that early exposure to BASIC, without being able to switch on the Speccy and almost immediately start bashing out stupidly simple bits of code (with the almost immedate reward of then seeing it do something), it's very likely I'd not have written any of it. So whilst I don't know what my career path would have been had it not been for BASIC, I know what it wouldn't have been, which is what I've been doing, and loving, for the past quarter of a century.
-
Friday 3rd May 2024 20:52 GMT Anonymous Coward
While not free you also have purebasic which has been in development for 20+ years, cross platform windows Linux Mac os, x86 x64 and arm m1, raspberry pi.
While it's roots are basic it's closer to c and runs just as fast as native c but it's much quicker to develop with because of its cross platform tool set, something like 1600 commands.
-
Friday 3rd May 2024 21:10 GMT Terry 6
BBC Basic
This was the one I learnt to use. At school, just a few years before, we had been taught to code using punch cards. But BASIC was just so much quicker and easier to get useful programmes written. And BBCBasic could have 6502 assembly code sections. Which made the programmes that bit more sophisticated and efficient.
Not that I remember a damned thing. And programming these days is so different, All those libraries and stuff.
-
Saturday 4th May 2024 04:16 GMT heyrick
Re: BBC Basic
What got me interested in computers as the realisation that the little beige box could do my maths prep for me.
Not that my teacher was particularly amused when the "show your working" part of the question contained a listing of the program that I wrote in order to answer the question.
[ Note: dyscalculia, so spending hours reading the MASSIVE Beeb user guide to understand enough BASIC to actually write some functioning code...was less arduous than trying to do calculations in my head; even today I massively cheat - what's 7 times 7? No idea, but 10x7 is 70 and 3x7 is 21 (I remember those two) so 21 away from 70 is 50 (-20) minus another 1 to make 49. You might have rote learned the times tables at school but most of that never stuck for me as numbers aren't quantifiable, they aren't "things". Seventy is one more than sixty nine, but what is seventy? It can be anything. Seventy cute girls? Seventy machine guns? Seventy quid? All completely different, while at the same time all entirely "seventy". See the problem? ]
-
Saturday 4th May 2024 09:13 GMT keithpeter
Re: BBC Basic
@heyrick
"Seventy is one more than sixty nine, but what is seventy? It can be anything. Seventy cute girls? Seventy machine guns? Seventy quid? All completely different, while at the same time all entirely "seventy". See the problem?"
Oh yes.
And the fact you can see the problem puts you well up in mathematical knowledge. Frege and Bertie Russell are waving. David Hume is offering a wee dram up on Queen Street.
-
Saturday 4th May 2024 17:59 GMT I could be a dog really
Re: BBC Basic
even today I massively cheat - what's 7 times 7? No idea, but 10x7 is 70 and 3x7 is 21 (I remember those two) so 21 away from 70 is 50 (-20) minus another 1 to make 49
That is NOT cheating.
It's what anyone should be able to do for any values they haven't learned by rote. Yes, at school I learned the times table, and the commonly used numbers are still there - but the infrequently used ones have faded away. So when it's something I don't have in my head - think of the most convenient ones I do have and do it like you've described. It's a valuable skill to be proud of, not to consider "cheating".
-
Saturday 4th May 2024 21:20 GMT Terry 6
Re: BBC Basic
I massively cheat - what's 7 times 7? No idea, but 10x7 is 70 and 3x7 is 21 (I remember those two) so 21 away from 70 is 50 (-20) minus another 1 to make 49.
That's not cheating. That's maths. And lots of kids don't get multiplication tables. Because Rote Learning only works for some people in some circumstances*. It's beloved by politicians because it's measurable, cheap and easy to communicate to the voters. ("Back to Basics"). But it isn't, educationally, much more than a shortcut. Even in real life, as useful s it is, there are plenty of alternatives, as you've discovered for yourself.
*It doesn't work very well under stress. Like the stress of -er- a times tables test .
-
Tuesday 7th May 2024 12:46 GMT ChrisC
Re: BBC Basic
"Even in real life, as useful s it is, there are plenty of alternatives, as you've discovered for yourself."
Which is a problem for those of us well versed in said alternatives, when our kids then come to us asking for help with their maths homework... I don't have any difficulty in understanding what the questions are asking, or coming up with the answers, but trying to get my head around how to explain how to get from A to B using the techniques they're expected to use, as opposed to the techniques I was either formally taught or which simply make the most sense to me now, is a genuine struggle.
-
Tuesday 7th May 2024 12:49 GMT Korev
Re: BBC Basic
>> I massively cheat - what's 7 times 7? No idea, but 10x7 is 70 and 3x7 is 21 (I remember those two) so 21 away from 70 is 50 (-20) minus another 1 to make 49.
>>
> That's not cheating. That's maths.
My dad taught teachers how to teach maths in the 80s/90s. One thing he'd do is ask a room full of teachers or parents how they do calculations like these and people would get flustered that they were doing it wrong as others did it differently. His point was there's often more than one way to get to the correct answer and you should use the method best for you.
He also got me going with computers, first using LOGO and then BASIC of various forms - computing was counted as part of maths then.
-
-
Sunday 5th May 2024 21:21 GMT Fruit and Nutcase
Re: BBC Basic
@heyrick
Just came across this article, published today -
Discovering that I have dyslexia, and most probably dyscalculia, later in my life has raised many questions for me, not least whether a childhood diagnosis would have changed the trajectory of my life, both personally and professionally.
-
-
Saturday 4th May 2024 08:55 GMT Soruk
Re: BBC Basic
I started on a Spectrum when my mum brought one home, but my biggest influence was my school getting a room of 10 BBC Master machines, then my folks getting an Archimedes and later a RISC PC (still a daily driver for them).
Aside from working in IT, it also culminated in me starting a project 6 years ago which looking back on just how much work was involved, I likely would never have started - picking up the abandoned Brandy BASIC code and creating the Matrix Brandy fork. It remains in active development to this day. (And yes, it also neatly shows off that I can't design web pages to save my life)
-
Monday 6th May 2024 17:04 GMT Herring`
Re: BBC Basic
The thing about the Beeb, for me was documenting all the hardware and making the assembler easy to get into. I am of the age where we had the 6502 and Z80 factions. We were too nerdy to get into West Side Story type elaborate dance-fights. But we would see them poking all these bytes in and think WTF?
Also the 6502 assembler - there were only about 26 instructions and a bunch of them were the BCD crap that nobody could figure out a use for. The you realise that the zero page is basically giving you another 128 registers ...
-
-
-
Sunday 5th May 2024 12:36 GMT Adam Trickett
Re: PowerBasic, formerly TurboBasic (formerly TurboBasic)
I started with Commodore BASIC V2 (Microsoft) and then used BASIC Lighting on the 64 and some BBC BASIC, but Turbo BASIC was my favourite BASIC anywhere...
TurboPascal used a similar IDE, and Borland's tools were way ahead of anything for years...
-
-
Saturday 4th May 2024 17:00 GMT steelpillow
More BASICs still
Wow! An interpreted language! Type it onto the command line and it runs! After FORTRAN IV on punched cards and PLAN on punched tape, my 1976 encounter with a PDP11 "mini" (the size of a mere filing cabinet) was a revelation! Can't recall but I think it would have been something DEC called BASIC-11. Later on Sinclair, BBC, Mallard and SAM BASICS. I liked Bruce Gordon's SAM BASIC because it was procedural, you could write modular code without getting lost in GOTOs or worrying about line numbers (beyond the occasional RENUM if you had to squeeze in a lot more lines), although it wasn't as "correct" or as fast as Locomotive's Mallard BASIC.
Spaghetti? Nobody writes spaghetti code in any language unless they are a bad programmer or desperately pushed for time. I even used to do weird shit like adding inline comments to remind me what I was trying to do. Boy, did the cognoscenti trash my style for that, what a waste of bytes! Those were the days....
-
Saturday 4th May 2024 18:11 GMT I could be a dog really
Re: More BASICs still
Unfortunately, BASIC (at least in the versions around when I was at school and computers were just arriving) lacked the constructs that make spaghetti free code easy to avoid. Yes it has GOSUB, but not IF ? THEN something {ELSE something else}. So it encourages lots of GOTOs.
Add in that the staff teaching "computing" were probably as new to it as we were, and it meant teaching what are now considered good ways of coding just didn't happen - spaghetti code was the natural outcome and neither us nor the teachers knew any better.
Back then I found FORTH (RPN is still my favourite construct, especially when I'm forced to count a gazzillion brackets in an Excel calculation) and Pascal (thank you Niklaus) and remember working through a book and doing Mondrian style images to introduce forward references and mutual recursion (mind blowing to someone who learned on BASIC without the concept of local and global variables. I once sat down and tried to remember the languages etc. I've learned (to some extent or other) over the years - it was a long list, longer by the time you include the different command lines of a variety of equipment. Then a couple of years ago, work actually paid me to learn Python - just a pity I've not been able to use it enough to keep it in my head :-(
Could I write good BASIC these days ? I could, but then in most cases why would I when there are so many alternatives around ?
-
Saturday 4th May 2024 18:39 GMT anthonyhegedus
Re: More BASICs still
It's rare to bump into people who've used FORTH, let alone know what RPN even is. All my calculators are RPN (of course) and although I don't program any more (I stopped being a programmer over 30 years ago), I have fond memories of FORTH on various devices in the 1980s. Hobbyist stuff then but still amazing for the time: A fast interpreted (semi-interpreted, anyway) language that was better in many ways than most BASIC implementations on home micros at the time.
-
-
-
Sunday 5th May 2024 05:13 GMT swm
Re: More BASICs still
Dartmouth BASIC was compiled but the system took pains to hide this fact so as not to confuse the user. (1964)
I wrote the precursor to BASIC called DOPE (Dartmouth Oversimplified Programming Experiment) on the LGP-30.
FORTRAN was considered but it had a FORMAT statement that would take a week of instruction to use. Remember that the original FORTRAN had no IF statements and the only branching construct was the GOTO statement (or IF X.EQ.Y) 20, 30, 40) or equally non-structured constructs.
ALGOL-60 was considered but it didn't have any I/O.
BASIC could be taught in an hour.
-
Sunday 5th May 2024 15:34 GMT keithpeter
Re: More BASICs still
"I wrote the precursor to BASIC called DOPE (Dartmouth Oversimplified Programming Experiment) on the LGP-30."
@swm
That puts you in the time frame to help resolve a possibly false memory I have: was there ever an EVAL$ statement in Dartmouth BASIC or another early BASIC?
I have recollections of having written some primitive self-modifying programs that relied on EVAL$ but that may or may not have been the BASIC I used to use over a teletype into a mainframe back in the early 70s. It could be a false memory from Acorn Archimedes Basic V which I think did have the EVAL$ statement.
PS: a stupidly simple BASIC program to generate (say) the Fibonacci sequence can be explained to adult basic maths students in half an hour. Try that with python or scheme and see what happens...
Icon: well done
-
Tuesday 7th May 2024 17:10 GMT I could be a dog really
Re: More BASICs still
Ah yes, that reminds me ...
At uni we had a module to do in computing - on the Vax, accounts locked down, only BASIC. It was compiled, but this was hidden so the only clue as a (back then, fairly clueless*) user was a short pause between hitting "run, enter" and it doing something. A friend showed me how to escape and run interpreted - in theory it should be slower, but in practice faster as interpreted programs had a higher priority in the queue.
* Heck, I once hit ctrl-s by mistake and had to ask for help as my terminal was "locked up" :-(
But the abiding memory from then was the notice in the front of the printer - big black on yellow label on the bottom of the space where the dot matrix head whizzed back and forth. It read something like "keep personal items such as neckties and hands clear". Hmm, I suppose you could class hands as personal items, but it always struck me as odd wording.
-
-
-
Saturday 4th May 2024 22:53 GMT david 12
Re: More BASICs still
Nobody writes spaghetti code in any language unless they are a bad programmer or desperately pushed for time
"Nobody" is a strong word. I had to work with code that used computed GOTO's to jump into dynamically-loaded objects, which used library routines from the resident code.
In c, using case statement and library functions isn't called "spaghetti", but it's the same thing only with the return address on the stack. Using only line numbers, and with no GOSUB, you've got the classic "spaghetti" problem: it's not the GOTO, it's the Where From.
-
-
-
-
Sunday 5th May 2024 22:22 GMT EricPodeOfCroydon
Re: Anyone remember...?
Early 1980s, working for a software house in North East of England, writing software packages for the British outpost of those lovely Italians, Olivetti. The BCS 2099 was probably one of the last 'visible records' machines, capable of keeping records on large cards which could be fed into a printer, printed on, but would also store data on a magnetic stripe up one side. Earlier machines (I think the immediate predecessor was the BCS 2030?) were programmed in a kind of 'high level assembler', called BAL if memory serves, but not related to any BAL I can find on t'internet now. The 2099 introduced HAI BASIC, of which I can also find no trace. Maybe I need to Google in Italian!!
-
-
Monday 6th May 2024 00:41 GMT RobThBay
Re: Anyone remember...?
Wow, talk about ancient history.
Supporting/programming those old Olivetti machines was the first job I had after finishing college.
Luckily BAL was on the way when I got there. I hated working in Assembly.
The new 8K machines with basic were much nicer. Do you remember only being able to have one operand per instruction?
If you wanted to add A,B & C together and store the result in D you needed to do it like this:
D=A+B
D=D+C
Variable names were limited to 2 characters, 1 character and 1 digit.
The other quirky thing was how it handled fractions of a penny. It always truncated the value rather than rounding up to the nearest penny. Which caused a lot grief when I had to write a daily interest savings account program for a financial institution.
I ended up learning enough Italian to be able to understand the tech manuals.
Ahhhh... the good days.
-
-
Sunday 5th May 2024 17:08 GMT TWB
Bad programming
I learnt to programme basic by copying the listings in PCW mag. I also learned loads of bad habits to make code run as fast as possible e.g.
A = A * (B>97) - OR if B is greater than 97 then set A to 1 (or -1 in commodore basic)
When I got a job writing basic programmes that were to be included in a book - my boss/author had to spend some time trying to teach me how to structure my code and make it readable rather than fast.
-
Monday 6th May 2024 13:09 GMT osxtra
How May I Direct Your Call
In the early 90's, I got a job working for a junk mail company that had US Census data on mainframe-style 9-track mag tape.
This, combined with a for-its-time modern 386 SX 16 PC containing a whopping 4 megs of memory running DOS v4, and a 1600 BPI tape drive whose control box was bigger than the computer, allowed me to pull data which would ultimately become postcards arriving in people's mailboxes exhorting them to "claim their free steak package", "visit the greatest timeshare of all!", and so on.
I only lasted a few years there, but helped the company transition from a Varityper, plates from a vaccum press and a 2-color Heidelberg into the digital word, with me churning out around a million names a month, 4-up onto letter-sized cardstock from a 75 page per minute cold-fusion HP laser around the size of two refrigerators laying on their sides, stacked one on top of another.
As there were no readily available "apps" for getting mainframe-style tape drive data into a PC, I had my employer purchase v7 of the MicroSoft Professional Development System, an interpretation of BASIC which could be compiled, and rolled my own.
Wanting to speed things up, I employed QEMM and other then-modern memory management schemes to trick DOS into using as much of that four megs of memory as possible, and had my code suck as many fixed-field records from the tape drive as it could at once into memory, parsing them to record size.
Why not just read it all into disk once and work from there? The data on those 750+ reels comprised some 25+ gigabytes, and I had a RLL hard drive which IIRC had a 40 meg capacity. So, much reading of tapes, over, and over, and over again.
The tape drive's docs specified an offset I could use to take advantage of "all that memory", as standard DOS only worked with a max of 640K.
Discovered though, that while the driver for the 9-track was 16 bit, BASIC was still 8, so I couldn't actually grab all that data at once. The drive would read what I'd asked it to (I think), but thanks to DOS not all of it could ever make it into the 4 megs of memory, so if I asked for too much at one time I'd just get zero's.
Seeking a solution, I placed a call to M$, and eventually, actually got a human on the line.
Once the guy got over laughing and asking "but why for god's sake aren't you just using a mainframe (they shop had actually hired me away from an operator gig at a small Burroughs shop, but we didn't have one, and didn't want to rent time, having spent all this money on the PC, tape drive and printer), it eventually was determined that yes, this was a bug, and no, they didn't have a workaround.
It's nice being able to remember that at one time - albeit 30+ years ago now - one could actually speak to M$.
Channeling the great Weird Al Yankovic in "It's All About the Pentiums": "I'm down with Bill Gates, I call him Money for short. I call him up at home and I make him do my tech support."
-
Monday 6th May 2024 15:54 GMT chololennon
Fond memories :-)
BASIC was my second programming language (Logo was the first one). I learned in the 80s. I used a lot of versions, MSX, Commodore, some Casio variants, GW-Basic, qbasic, quickbasic, and finally VisualBasic (3 to 6). Even being a C/C++ programmer, at the end of the 90s, during 3 years, I made my livings as a VB programmer, what a shame! ha ha :-P
-
Monday 6th May 2024 23:09 GMT aerogems
I remember playing Gorilla on QBasic in high school on the library computers. The school librarian being none too pleased that I knew how to bypass the loading of Windows 3.1. IMO, they should have been happy! Gorilla is a good way to teach things like geometry, but they couldn't ever see past "Oh gnoes! A vijama game!"
I've also done a fair bit of VBA programming. A horrible solution to be sure, but also literally the only one available pre-PowerShell to avoid having to manually create and send dozens of copies of basically identical status emails every day. All because the IT department at that company was either too lazy or inept to make sure VBA wasn't installed with Office. Blessed be the gods of IT for whichever one it was.
-
Tuesday 7th May 2024 00:02 GMT martinusher
Once upon a time.....
....there was a Visual Basic that wasn't Microsoft's. There were actually two environments out at that time, the other who's name I've forgotten (needless to say) was one that I actually preferred to use. Except I never really found a whole lot of use for "Beginner's All Purpose Symbolic Instruction Code", its just a scripting language and there are many alternatives out there.
(About the only use I had for VB on Windows was a little application that wound down a small red spot in the corner of my screen as the workday progressed, eventually turning into a green dot at 5pm. Even that got re-written in VC++, though.)