I have posted these comments a couple of times before, but it may be worth to post
them again:
The HP41 language
HP and some other people used the word FOCAL to refer to user programming
language or code for the HP41 family. It is supposed to mean Forty-One Calculator
Language, or something like that; in the vein of ALGOL (Algorithm Oriented
Language), COBOL (Common Business Oriented Language), ForTran (Formula
Translator), APL (A Programming Language), BASIC (Beginners All-purpose
Symbolic Instruction Code) and other, acronym-based names. The next wave of
languages used more “personal” names, as Pascal, Modula2, SmallTalk, etc; along with
the “letter based family” originated by BCPL siblings like “B”, then “C”, and later
“C++”. Of course, more current ones are Java and C#.
The KeyNotes user-support newsletter, published by HP around 1980 once opened a
contest to name the HP41 user programming language. Specifically, it refers to the
language used to create programs like this one:
01 LBL “HELLO”
02 “HELLO WORLD”
03 AVIEW
04 0.009
05 LBL a
06 TONE IND X
07 ISG X
08 GTO a
09 CLA
10 CLX
11 CLD
12 END
It is believed that the usage of the FOCAL name started after that contest.
I had used a Digital LSI-11 (the microprocessor-based version of the PDP-11
minicomputer) in 1978 and 1979; some of the available languages were BASIC and
FOCAL (Formula Calculator). FOCAL was similar to the BASIC dialects of the time,
but it lacked GOSUB-RETURN constructs, so it was suited for small, simple problem
solution, mostly with numeric answers; and not for large programs.
Line numbering and insertion
In BASIC, it was customary to number the statements in steps of 10, to allow for
“insertion” of debugging code or program modifications. In fact, some BASIC dialects
included the RENUMBER command, to tide up a program after debugging and
correction; or just to make room for more insertions!
So a program like:
10 INPUT “Enter an integer argument between 2 and 30”, X
20 F=1
30 FOR I=1 TO X
40 F=F*I
50 NEXT I
60 PRINT “The factorial of ”;X;” is”;F
70 STOP
will evolve to something like:
3 REM Clear the screen and put the cursor in the upper left corner
4 CLS
5 PRINT “Factorial Calculator – Ctrl-C to Exit”
10 INPUT “Enter an integer argument between 2 and 30”, X
11 REM Argument validation and error checking block
12 IF X<2 THEN PRINT “Invalid argument”: GOTO 10
14 IF X>30 THEN PRINT “Invalid argument”: GOTO 10
16 IF X<>INT(X) THEN PRINT “Invalid argument”: GOTO 10
18 REM End of argument validation block
20 F=1
30 FOR I=1 TO X
40 F=F*I
41 REM Beginning of debugging code block
42 REM Display and breakpoint just for debugging purposes
43 PRINT I, F,
44 PRINT “Press any key to continue”
45 D$=INKEY$
46 REM D$ is a dummy variable, only to create a wait for a keypress
47 REM End of debugging code block
50 NEXT I
60 PRINT “The factorial of ”;X;” is”;F
65 GOTO 10
70 STOP
A distinctive feature of the PDP-11 FOCAL was the use of fractional line numbers for
program statements, so if you need to insert a line between lines 1 and 2, you can just
use 1.5 as a line number.
Since the FOCAL name was already used for another programming language, my
personal opinion is that it should not have been a valid option for the HP41 case.
A non-successful submission
By the way, my submission for the HP41 programming language name contest was
EUREKA, because it is a well known, related to science word (and a rather universal
one), and also because it can be taken as an acronym for the most important features of
the HP41 system:
• Expandable (the hardware design allows for peripherals, extra memory, etc)
• User customizable keyboard
• RPN logic system
• Extendable (user programs are invoked in the same way than built-in functions)
• Keystroke operation (opposed to writing BASIC lines in other calculators)
• Alpha capability
Alas, I never received any feedback about this idea.