Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any contemporary programming environments that are syntax-compatible with QBasic?

I've got an old book about learning to program in BASIC. It's very well written, entertaining, and does a great job of teaching the first steps in computer programming. It's also my first book about programming, which started it all for me. :)

Now there's another person who would like to learn programming, and (since I can't be there to teach him myself) I cannot think of a better book to recommend him. Sure, the language is outdated, but the basics of programming haven't changed, and the book is just so well written that I haven't yet seen an equivalent (not that I've looked, admittedly).

There's just one catch - since the book is old, it's written about some dialect of BASIC that used to be popular on mainframes some 25 years ago (or so I gather). It's a thing with obligatory line numbering, no proper text editor (all editing happens on command line via line numbers), etc. That was already severely outdated when I first held the book.

Fortunately for me (and others) I found out that the syntax was almost entirely compatible with Microsoft QBasic. The only difference I remember is that in the book string variables had to be suffixed with ¤ while QBasic required $. Somehow they had both ended on the same key on that old keyboard, so I discovered this myself.

Now, I could recommend getting QBasic or QuickBasic, but I wonder if there isn't something better and more contemporary. Textmode screen, limited slow graphics and 64K of available RAM is sort of educational, but...

Any suggestions?

like image 983
Vilx- Avatar asked Mar 01 '12 08:03

Vilx-


2 Answers

You could try this: http://www.qb64.net/

It purports to something like what you require.

Important Note however: I have never tried this myself, and cannot vouch for it in any way. If it turns out to be a virus or something, then regard this as a disclaimer!

like image 171
Stephen Holt Avatar answered Jan 03 '23 15:01

Stephen Holt


bobsmith833's answer looks like the best way to run GW-BASIC (old, line numbers) and Q(uick)BASIC code on a modern OS like Windows 7.

Still, if you'd like something better and more contemporary, i recommend Python; it's free, has a clean syntax, is cross-platform, and very popular because of its flexibility, extensibility, and (built-in) modules.

The only things QBasic does better than Python are the documentation and easy low-level system access to speaker and display. Still, with a great tutorial like Think Python (of which i loved the earlier Python 2-only version) and a modern IDE like PyScripter, Notepad++ with NppExec, or SciTE, i'm sure you'll love it.

like image 41
Cees Timmerman Avatar answered Jan 03 '23 15:01

Cees Timmerman