FOCAL - a lost programming Language


In the early days of computing there existed several programming languages, that vanished throughout the years.

enter image description here

While Basic, C and others are still in use (somehow), older languages like Fortan, Algol, Cobol, Forth disappeared nearly completely.
One of these very early languages is FOCAL. It was mostly used in Digital Equipments PDP machines and later ported to Intels 8080 and the 6502 processors.
I've found a html script of the original FOCAL 1969 promotion flyer here:

As you might have guessed there is also a version for the KIM-1 (which is why I write about it), the first widely available and affordable microcomputer from MOS (later Commodore). Hans Otten did preserve the binary files, the manuals and the sourcecode for this piece of computer history.

The Syntax

Even though the commands differ, you can not deny simmilarities to basic. As in the early BASIC versions, every line must start with a number. But it offers a more structured way to program:

2.20 DO 1

The left number is the group number, you may nowaday call it subroutine.
If you want to have the listing of a subroutine, you just type WRITE n .
Or you could jump to a sub by giving the syntax DO n.
Wikipedia has a list of commands for you:

You can use the example programs from the wiki site on the KIM-1 with one restriction: varaibles can only have 1 letter.

Beside the normal syntax FOCAL offers some functions like rounding, random number generator, calling a subroutine with an argument, and memory manipulation like peek and poke in basic. The original PDP version of FOCAL offers a lot more functions than the ARESCO Version for the KIM-1, especially the trigonometry seems missing.

In retrospective FOCAL has so much more to offer than BASIC and it is imho irrational why BASIC got hyped and FOCAL got forgotten.
Raymond Chen offers an anecdote on how forgotten it got:

enter image description here

Have Fun, stay hungry!