One of the many reasons that I wanted to own a personal computer was for wordprocessing, grades (Mr.Baulch is a teacher – Ed.), keeping records (database), and for learning. I learded from a book with questions to the proper people to help me over the tight spots. I was told many times, “The only way to leard to write programs is to write programs.” I never knew there was to be a plan or flow-chart. After learning BASIC, I found there were many other computer languages. One of these was PASCAL. PASCAL, I discovered, had the structure I was missing in my earlier learning. I had to go back and re-learn all over again.
Dr. Niklaus Wirth, inventor of PASCAL in 1968, wanted a teaching aid to be used as a hypothetical language to teach others programming and structured, top-down design. Thus, PASCAL was born of a necessity. By 1970, he had a working implementation. After using PASCAL in the commercial and acedemic world for a few years, he found many shortcomings, many nonstandard extensions and awkwardness for large programs, and defects, problems in manipulating the memory and peripherals in a computer directly. He went further to form MODULA and, finally, MODULA-2. Even though Dr. Wirth found PASCAL to be lacking, many people continue to use it and praise its virtues.
“Introduction to PASCAL and Structured Design”, D.C. Heath and Company, Nell Dale and David Orshalick, is a very good book either for the beginner or for one who is more advanced in the use of computers and programming languages. This is a book I borrowed from the Computer Science classes at the school where I teach. Most of the time when you hear the term PASCAL, you think of Borland’s Turbo PASCAL. If you are just beginning , PASCAL sounds like some type of musician or an artist of some sort. Of course, neither is true.
Computer programming is nothing more that the process of planning a sequence of instructions for a computer to follow, and the program is the sequence of instructions outlining the steps to be performed. There are two phases to the programming process: the problem-solving phase (analyzing the problem, developing the algorithm, and testing), and the implementation phase (testing the program, debugging the program, and using the program). Utilizing the top-down design approach, you break the problem into a set of sub-problems until it has expanded every task to the smallest detail (hierarchical or tree structure). This makes the problem easier to handle. Once the problem is broken down to smaller problems, the task of encoding your program becomes a relatively simple procedure.
One of the nice things about PASCAL is the statements that are used in the constuction of a program. The heading gives you the name of the module or program and what is expected to be used. The declarations are like LET statements and can be broken up into things like constants, variables, characters, and Boolean. The statements are the executable part of the program or module, and are set off with a “BEGIN-END” pair. This makes the documenting of the program something that even a non-programmer can read. Many times the declarations and statements are self-documenting. Once the program is written and debugged, it is compiled – because PASCAL is a compiled language. Therefore, when the code is RUN, it is run as assembly code.
I still have much to learn, but it seems to be somewhat easier learning PASCAL after learning BASIC.
The following is reprinted from June/86 edition of Expansion“, the newsletter of the T/S Users Group of Fort Worth, Texas.