Screenshot of a teletypewriter running PIL, from 2 4 Using the Michigan Terminal System 6 01.

In this series of posts we'll look at the Pittsburgh Interpretative Language, or PIL, a simple interpreted language that can be used to do calculations and build small programs interactively.

The Pittsburgh Interpretative Language

PIL was developed at the University of Pittsburgh for the System/360 in the late 60s. It was based on one of the first interpreted languages JOSS that originated at the RAND Corporation in 1963. PIL improves on JOSS by providing improved debugging capabilities and error reporting.

The design goals for PIL were, according to MTS Volume 12:

PIL is oriented toward problem-solving, with program development and debugging facilities having highest priority. For the beginning user, PIL was designed to be clear, unambiguous, and hence, easily learned. For the experienced programmer, the language offers increased flexibility with statement structure and expanded capabilities for the solution of non-numeric problems. For the researcher, PIL reduces the amount of time and effort that must be expended in problem solving.

PIL can be used as a simple desktop calculator with variables

* set a = 3
* set b = 4
* type the square root of (a*a + b*b)
the square root of (a*a + b*b) =  5.0  

It can also be used to build simple programs interactively that can then be run:

* 1.01 demand a
* 1.02 demand b
* 1.03 type the square root of (a*a + b*b)
* do part 1
 a = ?_ 3
 b = ?_ 4
  the square root of (a*a + b*b) =  5.0


PIL on MTS is based on the second version of PIL, PIL/2. It was modified to integrate well with MTS files and system services.


No special installation instructions to get this language running - just do the standard D6.0 setup as described in this guide and then sign on as a regular user such as ST01.

Running a program using *PIL

Running the command *PIL on MTS will start the PIL interpreter. It is intended to be used in an interactive way where you enter commands and see the output directly. It can be used in batch mode by feeding commands into source but this is not the intended mode of operation. Inside the interpreter, programs and data can be loaded and saved with the load and save as statements.

Hello world

Let's see how to run a simple program to print 'Hello, world!' five times using PIL.

# $run *pil
# Execution begins   09:56:53 
  PIL/2: Ready
* for i = 1 to 5: type "Hello, world!"
  Hello, world!
  Hello, world!
  Hello, world!
  Hello, world!
  Hello, world!
* stop
# Execution terminated   09:59:06  T=0.004 

After starting PIL, enter the for statement at the * prompt. Output is shown immediately after the command is entered. Type stop to return to MTS.

In the next post we'll look at the language in more detail.

Further information

MTS volume 12 has a tutorial and reference for the PIL language and describes how it is integrated with MTS.

The video pictured at the top of this post, 2 4 Using the Michigan Terminal System 6 01, shows simple operation of PIL on a teletypewriter, starting from 21 minutes into the video.

The Pitt time-sharing system for the IBM system 360: Two year's experience. describes the operation of PIL at the University of Pittsburgh.

JOSS: Introduction To A Helpful Assistant is a very readable paper from the RAND Corporation on the language that inspired PIL.

The source code and implementation notes for PIL can be found in component 566 on tape 6.0T2 in the D6.0 distribution.

Source code for the hello world program can be found on github.