Paul’s Page on Pascal

See all articles from SINCUS v7 n2

In the last issue, in this column, I related some of the trivial aspects of programming. At the time I wrote that I had little “hands-on” feel for Pascal, and wrote what I felt was the absurd importance given the trivia of programming. Now after finishing the course, and still quite the novice in Pascal, I beg to differ with the concept of teaching a computer language.

In a complex subject such as a language, whether oral or computer, the individual has to master the phyiscal aspects first. A baby learns to control mouth and tougue to vary the sounds coming out of his mouth. After 5 or six years, society begins a formal training of the “language” after the child can speak. A computer language is on two levels, one the phyiscal and/or syntax, also one might include the basic computer keyboard and DOS as mastery subjects before one really begins the learning of the language. Then there is the programming aspect where the use of logic manipulates data to provide a useful tool for the computer user.

The teaching environment is inhibited by teaching a hybred subject that can be used on a MAIN FRAME or a PC. For less confusion, one or the other, but both tends to complicate matters. For the initial stages of instruction why not computer aided instruction? Are there no college level computer aided instruction software available?

The emphasis is on the pre-planning stage; outlining, charting, walking thru and testing, BEFORE the program is encoded. While a great amount of time is saved in the long run with the pre-planning, the course did not teach all the mechanics of Pascal first, and one was quite limited to what had been taught. If looping had not been covered, looping could not be used in the assignment. So, much effort was spent on doing without a function you may know of, and hammering together a program to run to teacher’s specs. While the language maybe structured, the lessons and assignments seemed random in relation to each other.

The problem is one of putting the cart before the horse or after. How can you do pre-planning until you are aware of the tools available to you in programming? How could you speak a word until you had heard one? How could you use conditional statements to solve a problem if you never read of one?

Pascal is often called a “great teaching language”. So would Basic. There are a few concepts in Pascal that are NOT a great breeze to learn. And Variables, VAR and the passing of such between modules(sub-routines) is a mental block for me. The teaching of the subject on a blackboard, then 24 or 48 hours later, use that material, just never gelled for me. The VAX system is not the greatest to LEARN on. If you make a single error early in the PASCAL program, the compilier picks it up and rolls it thru the whole program and you end up with 40 or 50 error statements in your syntax. And to read such, the statements scroll outa sight on the VAX screen.

With the TS computer in your home, and a manual at your side, you could learn basic BASIC. ENTER a few programs from magazines, and you learn how to debug. Of course you need the drive to push your self to do so. But what you don’t learn is STRUCTURED programming. The gurus feel this is the cat’s meow, the sliced bread of computing. You design your code(written program) so that you have a MAIN module and it may initialize your variables, and do NOTHING but call sub routines or procedures/functions as necessary. GOTOs are available, but they weren’t taught, and wash your mouth if mentioned. A very liberal sprinkling of remarks to aid your self at later dates of what the particular module does, and what each variable is for. Spelling out variables aids in the flow of reading the program. By writing the program out in ENGLISH, in simple statements, you also make it easy to transfer to another language or computer.

I am not going to attempt to teach PASCAL here, I will as space permits go into the problem solving aspects and how charting and pre-planning can be of help to even the BASIC user. If my order of HiSoft’s Pascal ever gets here, maybe I will discuss that.