ArticleslgStudy

computer science

FOCAL (programming language)

FOCAL (programming language) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand FOCAL (programming language) rather than just read about it. In short: FOCAL (acronym for Formulating On-line Calculations in Algebraic Language, or FOrmula CALculator) is an interactive interpreted programming language based on JOSS and mostly used on Digital Equipment Corporation (DEC) PDP series machines. JOSS was designed to be an interactive language to allow programs to be easily written by non-programmers.

FOCAL (programming language) — main illustration
FOCAL (programming language) — illustration

Key takeaways

  • FOCAL (programming language) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect FOCAL (programming language) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of FOCAL (programming language) from memory before moving on to harder problems.

Reference excerpt

FOCAL (acronym for Formulating On-line Calculations in Algebraic Language, or FOrmula CALculator) is an interactive interpreted programming language based on JOSS and mostly used on Digital Equipment Corporation (DEC) PDP series machines. JOSS was designed to be an interactive language to allow programs to be easily written by non-programmers. FOCAL is very similar to JOSS in the commands it supports and the general syntax of the language. It differs in that many of JOSS' advanced features like ranges and user-defined functions were removed to simplify the parser and allow the system to run in less memory. Some of the reserved words (keywords) were renamed so that they all start with a unique first letter. This allows users to type in programs using one-character statements, further reducing memory needs. This was an important consideration on the PDP-8, which was often limited to a few kilobytes (KB). Like JOSS, and later BASICs, FOCAL on the PDP-8 was a complete environment that included a line editor, an interpreter, and input/output routines. The package as a whole was named FOCAL-8, which also ran on the PDP-5 and PDP-12. When ported to the PDP-11, the resulting FOCAL-11 relied on the underlying operating system, RT-11, to provide file support and editing. The language definition was updated twice, to FOCAL-69 and a very slightly modified FOCAL-71. A port to the Intel 8080 was also available. FOCAL is notable as the language in which the original versions of the early video games Hamurabi and Lunar Lander were written. Both were later ported to BASIC, where they became much better known. FOCAL was not popular outside the PDP platform and largely disappeared during the move to the VAX-11. It had a strong revival in the Soviet Union where PDP-11 clones were used as educational and home computers (BK series).

History

JOSS

JOSS was released in May 1963 on the one-off JOHNNIAC computer at RAND Corporation. In RAND, use grew rapidly, and the machine, originally built in 1953, quickly ran out of capability. JOHNNIAC was decommissioned in 1966 and JOSS was reimplemented as JOSS-II on a newly purchased PDP-6, Digital Equipment Corporation's (DEC) first "big" machine. Use continued to grow and by 1970, the system was being used by 500 to 600 users across the country and had spawned several innovations such as mobile computer terminals that could be wheeled from room to room and plugged in for quick access. JOSS was highly influential. It emerged just as time-sharing was being introduced, when there was significant interest in man-machine interaction and computers were seeing wider use. Whereas most time-sharing operating systems of the era concentrated on user account and file management, leaving the users to do their own programming, JOSS provided file editing and a programming language in one package. RAND showed the system to a parade of people in the industry. DEC considered the PDP-6 a failure and initially suggested they were leaving the mainframe market. However, shortly after they introduced the PDP-10, which was a PDP-6 using newer semiconductor technology and packaging to produce a much simpler and more reliable design of what was otherwise an almost identical machine. RAND allowed DEC to distribute a version of JOSS-II on these machines under the name "Algebraic Interpretive Dialogue", or AID.

FOCAL The PDP-6 was DEC's first mainframe, and JOSS took full advantage of its power and memory capacity. The DEC programmers were familiar with the system and interested in JOSS, but most of the computers DEC sold had nowhere near the power needed to run it. Written by Richard Merrill, FOCAL removed features from JOSS as required in order to be able to run in the much more limited memory space of the PDP-8 and other 12-bit machines in the DEC lineup. To achieve this, a major change was made to reduce the amount of temporary data, or state, needed to parse the statements. One noticeable effect of this decision was that conditionals could only be used for branches, in contrast to JOSS, where conditionals can be applied to any statement. The other noticeable change was to rearrange the keywords so each started with a unique letter. This simplified the parser, which needed to read only the first letter of the command on a line of code, and could then skip forward to the next whitespace character. It would then compare that against an internal list of possible keywords, which was one character per entry. In contrast, JOSS had to continue reading until it had read the entire command word and then compared that against a list containing complete words. Not only did this change save memory in the parser, users could also save memory by typing in only that letter, reducing the size of the source code.

The first version of FOCAL was released in 1968 for the PDP-8. An updated version followed the next year, which was later known as FOCAL-69. The system as a whole, regardless of version, was known as FOCAL-8 when it was ported to other machines in the 12-bit series, including the PDP-5 and PDP-12. It was popular as it was highly efficient in memory use, which was often severely limited on these machines to a few kilobytes (KB). The similar FOCAL-11 ran on the PDP-11 under RT-11. Processor Technology also offered a version of 8k FOCAL, complete with Lunar Lander, for the Intel 8080-based Altair 8800 system. This was provided for the copying charge of the tape, while the source code was provided for free with other purchases.

BASIC While FOCAL was becoming popular on DEC machines, BASIC was becoming a more popular alternative on other platforms. By the late 1960s, several companies were making inroads in DEC's minicomputer stronghold, selling similar machines running time-sharing versions of BASIC. Notable among these was the HP 2100 series, running HP Time-Shared BASIC. David H. Ahl had recently joined DEC's PDP-8 Group, just as the company became interested in selling the machine into educational settings. Due to the popularity of BASIC in the education market, especially with the growing library of BASIC programs from the Minnesota Educational Computing Consortium, Ahl found selling the machine with FOCAL was difficult despite its advantages. As he later noted:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with FOCAL (programming language)

Start with the simplest possible case. Write down what FOCAL (programming language) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to FOCAL (programming language) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about FOCAL (programming language) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of FOCAL (programming language)

In research
FOCAL (programming language) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses FOCAL (programming language) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
FOCAL (programming language) is common in secondary-school and first-year university syllabi. It links to neighbouring topics DEC software, JOSS programming language family, Programming languages created in 1968, so understanding it makes those chapters shorter.
In everyday life
Look for FOCAL (programming language) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “FOCAL (programming language)” →

How to study FOCAL (programming language) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what FOCAL (programming language) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain FOCAL (programming language) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is FOCAL (programming language) in simple terms?

FOCAL (acronym for Formulating On-line Calculations in Algebraic Language, or FOrmula CALculator) is an interactive interpreted programming language based on JOSS and mostly used on Digital Equipment Corporation (DEC) PDP series machines. JOSS was designed to be an interactive language to allow pro…

Why does FOCAL (programming language) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study FOCAL (programming language)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on FOCAL (programming language).

Tags

  • DEC software
  • JOSS programming language family
  • Programming languages created in 1968

Keep exploring