By: Bakri Baharom @ Koboi Tunjang

A computer is not exactly a clever machine. It just follows instructions from programmers. In the old days, it was done through Assembly Language, which only nerds could do it. Then came the so-called High-Level Languages using English words to carry out commands, known as Reserved Words. They cannot be used for any other purposes.
Almost everyone started off with BASIC Language. It stands for Beginners All-Purpose Symbolic Instruction Code. Students in Engineering were using ForTran (Formula Translation). Then, there were Pascal, Algol (Algorithmic Language), LISP (List Processing) and Cobol (Common Business Oriented Language). The last was widely used in financing, payroll and human resource.
Subsequently, C was introduced and taken over by C++. Over the years, the application of computers evolved into many new areas, hence new languages. Some examples include Internet Banking, Computer Games, Mobile Applications (Java); Artificial Intelligent, Face Recognition (Python); Website (Javascript / HTML; Server Scripting (PHP) and Database Programming (SQL).
In the 1980/81 academic year, Koboi Tunjang started learning computer programming using BASIC. Each sentence starts on a new line. It is preceded by line numbers. The standard practice is to use 10,20,30…. You may use any number you like, 5,10,20,35…. But bear in mind that processing will start from the smallest to the highest number. Should you need to insert a new statement in-between two existing lines, just use any number between the two and the RENUM command to reorganise the lines. The word REM, LET, and PRINT are Reserved Words for Remark, Assigning Value and To Print, respectively. The line Remark is only for reminders or comments and is not processed. Let us consider a sample.
10 REM CALCULATE THE AREA AND
20 CIRCUMFERENCE OF A CIRCLE
30 LET P=3.14
40 PRINT “RADIUS “;
50 INPUT R
60 LET A=P(R^2)
70 LET C=2PR
80 PRINT “R= “;R,”A= “;A,”C= “;C
90 PRINT
RADIUS 5
R= 5 A= 78.5 C= 31.4 Â
First, you must know how to solve the problem itself. The area and circumference of a circle are given by the formula Pi x R x R (or we say Pi R Squared) and 2 x Pi x R, respectively, where Pi equal 3.14 and R is the value of its radius. Â When you run the program, the computer will process line by line. In fact, BASIC being an Interpreter-Type language, will report as soon as you press Enter Key after every single line. If there is any error, it will not accept a new line. For example, if you mistype PRINT as PRONT – that is categorised as Syntax-Error. You execute or run the program (or coding) after it is error-free. First, it shows you the word Radius on the screen and waits for your input. It has to be a number; let us say you key in 5. The value of 5 is assigned to what is known as Variable R. Imagine there is a box labelled as R with a value of 5 in it. The computer will next process: A=P(R^2).
Â
In Mathematics, the expression in parenthesis will be done first, hence R^2. This is known as Precedence. The value is then multiplied by the value of P and assigned to a location called A. Similarly, the value of 2 is multiplied by the value P and R and stored in variable C. Line 70 will print the letter R= followed by the value of R (5), A= 78.5 as the area and C= 31.4 as the circumference respectively. All are on the same line as we use a semicolon (;), forcing the same line output. Each of the results is separated by a comma (,). You must learn all the rules.
Â
Next, ForTran:
Â
C Fahrenheit to Celsius Conversion
C Formula: F=(5/9)(F-32) REAL F, C READ(5,) F
C=(5./9.)(F-32) WRITE(6,) F,C
STOP
END
Â
The above is a sample of ForTran Programming, which Koboi Tunjang took in the 1980/81 academic year, too – using Punch Card. The card is produced by a special Punch Card Machine. The program is to accept a reading in Fahrenheit and converts it to Celsius.

The presence or absence of holes on punched cards represents digital data. The photo is sourced from the internet, as the original belongs to Koboi Tunjang is misplaced years ago
Each of the coding lines is represented by one card. In the example, we have 10 lines and, therefore, should have 10 cards arranged in that sequence. Should you drop and jumble up the stack, then it will not only give wrong results but plenty of errors too!
Once ready, the cards are submitted to Electronic Data Processing (EDP) department, where a Card Reader Machine reads the coding and fed to Mainframe Computer. Both coding and results are stored on Magnetic Tape Unit and printed using High-Speed-Printer or displayed on Remote-Console (known as Dumb Terminal).
As usual, you must know the steps on how to convert from Fahrenheit to Celsius. First, accept the value of F, subtract 32, and multiply by 5/9 – (Formula: C = (5/9) x (F-32).
Secondly, you need to understand Integer and Real Decimal Numbers. The first one is a whole number, and the latter is a number with a certain decimal point. When you run the above program with F = 90, then the results will be 90.0000000 and 32.2222222. Take note of the following details:
a) F and C represent your Variable Values for Fahrenheit and Celsius, respectively. ForTran specifies that you must declare both variables to be of a certain type, Real or Integer (e.g. REAL F, C).
b) If BASIC uses INPUT, ForTran uses the word READ for a similar job to accept your response. While BASIC uses PRINT, ForTran uses WRITE for output.
c) The general format READ and WRITE is Fw.d, where w is the width of the variable and d is the number of decimal places. The line READ(5,) F by right should be READ(.) F, but the value 5 denotes 5 spaces reserved for input F. Similarly, WRITE(6.) F, C. Six spaces are reserved for the values of output F and C, respectively.
d) The line C=(5./9.)*(F-32) means 5 and 9 are treated as Real Decimal Numbers, which produces 0.5555555 rather than 5 divided by 9, resulting in 0 (all integers).
e) ForTran uses the letter C as a Comment compared to REM for BASIC. However, you cannot simply type your coding as you wish, like in BASIC. When punching your coding on the Punch Card machine, each Comment and other statement must be in a certain defined column. Later version of ForTran did away with this requirement and allowed multiple statements in one line. Each character is represented by a set of holes in a column of the card. A numerical digit uses only a single hole, while alphabets and other symbols use 2 and 3 holes, respectively. A typing error necessitated re-punching an entire card.
Looking back, you would wonder how tedious the job was. But that was how technology started and evolved one step at a time to reach the sophistication today. We should pay some tributes to Hollerith, that contributed to the success of the card system and IBM (International Business Machine), which came up with Punch Card machines.






Leave a Reply