Parlez-vous Pascal?
COMPUTER LANGUAGESPicture if you will two doctors huddled together in a corner of a hospital cafeteria talking shop. As you approach these two learned men and try to listen in on their conversation, you will no doubt become confused and bewildered by the terminology used. Items such as scalpels, hemostats, and respirators will probably have little meaning to you. These terms are foreign to you. It is as if you had just arrived in another country. The same is true of computer languages. Computer languages are different because they perform different functions, different jobs.
Meanwhile, back at the hospital, a dentist joins our two colleagues in the cafeteria. He is much more at home in this setting than we will ever be, but he is not completely accepted as an equal. The dentist would like nothing better than to talk about cavities and molars and the cleaning of teeth, whereas our two friends are busy discussing heart transplants and kidney operations and Mrs. Smith in room 3 1 A who has a terminal case of bad breath. We see that the dentist is left out of the conversation. Not because he isn't a doctor, but because he wants to talk about dentistry, a different dialect of the language of medicine.
The analogy could have been made using carpenters and plumbers, cowboys and indians, or even Laurel and Hardy. But the points to stress are that there are many different languages and there are many different dialects within any given language. This goes for computer languages as well as for human languages. There are many different computer languages. There are many dialects within any one computer language.
Differences in computer languages are mostly brought about by their use or function. FORTRAN, for example, (its name stands for FORmula TRANslation) was designed for use by scientists. In fact, they were usually the only ones to access to computers back in the 1960's. In those days, computers were made of tubes and transistors instead of the large scale integrated circuits used in the mini and micro computers of today. And because scientists use numbers extensively, FORTRAN was designed with number handling in mind. It is a great language for processing large quantities of numbers, what is called number crunching. It can work with integers (whole numbers), real numbers (floating point numbers), and complex numbers (imaginary).
FORTRAN example:
C - READ THREE NUMBERS AND PRINT THE SUM.
C - READ (5,100)X,Y,Z
100 - FORMAT(3F10.2)
SUM=X+Y+Z
WRITE(6,200)SUM
200 - FORMAT(F10.2) STOP END
Differences in computer languages, and especially among the different dialects can be caused by the wide range of hardware used in today's computer systems. ATARI software is geared heavily towards color graphics and sound effects. A Radio Shack TRS-80 does not have the software to run such devices because it does not have the necessary hardware. It would be a waste of time for everyone involved to write software for hardware that is not available.
The only thing that FORTRAN is not very good at is working with character strings. It does have some elementary string handling abilities, but they are mostly for labeling the printed data. It is just not very good at handling more complicated string manipulations. This brings us to another very important language.
Its name is COBOL. If there are any loyal fans of the now cancelled and sorely missed television series "BATTLESTAR GALACTICA" reading this, they will no doubt think that I am talking about the planet on which all human life is supposed to have evolved. However, since I am talking about computer languages, I must mean COBOL (COmmon Business Oriented Language).
COBOL is not a very good language for number crunching. It was not meant to be. Instead it keeps inventories for department stores, prints out reports on productivity, updates medical records for hospitals, as well as other business activities. COBOL is designed for a business environment, unlike FORTRAN which is geared towards scientific applications. It is a very wordy language. You can read a COBOL program like a chapter in a book and understand what is going on.
COBOL example:
START.
OPEN INPUT MASTER-IN OUTPUT MASTER-OUT.
NEXT-RECORD.
READ MASTER-IN RECORD AT END GO TO FINISH-IT.