By: Paul S. Cilwa Viewed: 12/13/2018
Topics/Keywords: #VisualBasic6.0 #ProgrammingforMicrosoftWindows Page Views: 1590
Optional preliminary material for this free online course in Visual Basic 6.0.

Where Did VB Come From?

While the Visual Basic language is simple and easy to learn, there are a few quirks in it that are made much easier to understand if we know where the language came from.

The BASIC language was invented in 1964 by graduate students at Dartmouth College in Vermont. This was a long time ago. It was a different world, then.

For one thing, there were no such thing as calculators, and computers were not widely used. The idea of a college buying one was still pretty novel; and a question that was inevitably asked, was, "What department gets the computer?"

"Well, what do computers do?"

"Well…they add numbers together…"

"Ah! Then, we'll give it to the Math department."

Consequently, all the early work on computers was done by mathematics majors, who have influenced pretty much every aspect of computing ever since.

(I often wonder how different computer programming would be today, if the Art departments had gotten computers first?)

In any case, the graduate math students at Dartmouth thought it would be really great—"swell" was the term they used back then—if they could figure out a way to make the calculating power of the computer available to the undergraduate students, the ones with little interest in the computer. They conceived of putting computer terminals all over the campus, with keyboards, so that anyone interested could type in a math problem and get an answer.

Up to this time, the most popular language for addressing mathematics on a computer was FORTRAN, which all the graduate students had learned. However, writing a program in FORTRAN was complicated; it took taking an actual class to learn. Requiring that of the undergraduate students kind of defeated the purpose of the convenient terminals. So, the grad students invented a new language, which they called BASIC (for Beginner's All-purpose Symbolic Instruction Code).

FORTRAN did not start out as a block-structured language (one that uses procedures), so BASIC didn't, either. Each line has a line number, and the line numbers doubled as labels. At first there were no control structures: no While or Loop statements at all. All conditional control was accomplished via If and Goto statements. A typical sample of BASIC code might look like this:

100 PRINT "Program starting"
110 INPUT H, W
130 IF H > 40 GOTO 400
140 PRINT "Paycheck is ";H*W;" with no overtime."
150 GOTO 500
400 V = H - 40
405 H = H - 40
410 PRINT "Paycheck is ";V*(W*1.5)+H*W;" with ";
420 PRINT V;" hours overtime."
500 PRINT "Program done!"
510 END

Considering that the results were many times more accurate than a math student could get from his or her sliderule, it should be no surprise that BASIC was a great success; with it quickly spreading to other colleges and universities across the United States and Canada.

Enter the Microcomputer

A few years passed. Color television sets were new, and expensive. An electronics firm was founded, Heathkit, that sent purchasers the parts of a color TV, for the purchasers to assemble! "Learn electronics at home!" the advertisements read.

So, when Intel invented the first microcomputer CPU (the 4004), a few enterprising young men founded the Altair Computer Corporation, which was built on the same principle: You order the parts, assemble them yourself, and voila! You own a microcomputer.

Learning to solder transistors and ICs together was one thing; programming is much harder. So, since the founders of Altair had learned BASIC in college, it was only natural that they would use it as the command language for their microcomputers.

Back in those pre-corporate-merger days, most businesses in the country were small, Mom-and-Pop organizations. Pop was usually the shopkeeper, and Mom usually did the books. So, Pop (more likely to be the hobbyist in those days) would convince Mom to let him buy an Altair microcomputer. "As soon as it's built," he'd tell her, "it will do your bookkeeping for you!"

Well, eventually Pop would have built the computer…then had to write the accounting program he'd promised! …in BASIC. A language originally intended for ten or fifteen line math problems was being used to write 5,000 line accounting systems, payroll programs, inventory systems, and more. The code was, of course, completely unreadable to anyone but the one who wrote it. Nevertheless, a lot of the small business computerization began with an Altair computer, with BASIC implemented on a single ROM (Read-Only Memory) chip.

By now, BASIC's hold on the microcomputer industry was solid. 8-bit microcomputers came next, with a real (if simple) operating system called CP/M. Such a computer could run programs written in any language for which a CP/M compiler existed; and there were several…but none was more popular than BASIC, which now included many new features, so many it couldn't fit in a ROM any more: It came on a 8-inch floppy disk. You would load BASIC into your computer, then replace the BASIC disk with another one to hold your actual program!

When the IBM PC was introduced in 1981, it included a version of BASIC, again burned into a ROM. Other companies quickly copied the computer's design, often improving on it; but they couldn't include the copyrighted BASIC ROM. So, a non-IBM version of the operating system, MS-DOS, included a software BASIC.

Microsoft then released an expanded, block-structured BASIC called QuickBASIC; other language companies sold versions of their own. However, the BASIC langauge suffered a setback with the release of Borland's Turbo Pascal: It only cost $19.95, and was clearly a superior language for writing real programs.

History

Throughout the rest of this course, I'll be presenting more details of the history of Visual Basic here and there in sidebars like this one. Watch for them! Remember, to know where you're going, you have to know where you've been.

BASIC languished, then, for several years, until Alan Cooper used it as the basis of Visual Basic, which he promptly sold to Microsoft. While it was crude compared to the Visual Basic of today, it was nevertheless easy-to-use (for small programs) and unexpectedly became Microsoft's biggest language seller, where it has remained ever since.

That first version of Visual Basic did not have a Data control, user-defined objects, MDI (Multiple Document Interface) support, auto-completion of keywords, or many other features we take for granted. Still, it changed the face of computer programming, and has led the way in the design of integrated development environments ever since.