PILOT
Encyclopedia
Programmed Instruction, Learning, Or Teaching (PILOT) is a simle historic programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 developed in the 1960s.
Like its younger sibling LOGO programming language, it was an early foray into the technology of computer assisted instruction (CAI).

History

PILOT was developed by John Amsden Starkweather
John Amsden Starkweather
John Amsden Starkweather was a Professor of Medical Psychology at the University of California, San Francisco . Starkweather was a clinical psychologist and a valued teacher by generations of clinical psychology interns and graduate students at UCSF...

, a psychology professor at the University of California, San Francisco
University of California, San Francisco
The University of California, San Francisco is one of the world's leading centers of health sciences research, patient care, and education. UCSF's medical, pharmacy, dentistry, nursing, and graduate schools are among the top health science professional schools in the world...

 medical center. In 1962 he developed a simple language for automating learnng tests called Computest. Starting in 1968, he developed a follow-on project called PILOT, for various computers of the time such as the SDS 940
SDS 940
The SDS 940 was Scientific Data Systems' first machine designed to support time sharing directly, and was based on the SDS 930's 24-bit CPU built primarily of integrated circuits. It was announced in February 1966 and shipped in April, becoming a major part of Tymshare's expansion during the 1960s...

.

Language syntax

A line of PILOT code contains (from left to right) the following syntax
Syntax
In linguistics, syntax is the study of the principles and rules for constructing phrases and sentences in natural languages....

 elements:
  • an optional label
    Label (programming language)
    A label in a programming language is a sequence of characters that identifies a location within source code. In most languages labels take the form of an identifier, often followed by a punctuation character . In many high level programming languages the purpose of a label is to act as the...

  • a command letter
  • an optional Y (for yes) or N (for no)
  • an optional conditional expression in parentheses
  • a colon (":")
  • an operand
    Operand
    In mathematics, an operand is the object of a mathematical operation, a quantity on which an operation is performed.-Example :The following arithmetic expression shows an example of operators and operands:3 + 6 = 9\;...

    , or multiple operands delimited
    Delimited
    Formats that use delimiter-separated values store two-dimensional arrays of data by separating the values in each row with specific delimiter characters...

     by commas.


A label can also be alone in a line, not followed by other code. The syntax for a label is an asterisk followed by an identifier (alphanumeric string with alphabetic initial character).

Command letters

The following commands are used in "core PILOT". Lines beginning with "R:" indicate a remark (or a comment) explaining the code that follows.

A: Accept input
Input/output
In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...

 into "accept buffer
Buffer (computer science)
In computer science, a buffer is a region of a physical memory storage used to temporarily hold data while it is being moved from one place to another. Typically, the data is stored in a buffer as it is retrieved from an input device or just before it is sent to an output device...

". Examples:

R:Next line of input replaces current contents of accept buffer
A:
R:Next line of input replaces accept buffer, and string
String (computer science)
In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet....

 variable
Variable (programming)
In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents...

 'FREE'
A:$FREE
R:Next 3 lines of input assigned to string variables 'X', 'Y' and 'Z'
A:$X,$Y,$Z
R:Numeric input assigned to numeric variable "Q"
A:#Q

C: Compute and assign numeric value. Most PILOT implementations have only integer
Integer (computer science)
In computer science, an integer is a datum of integral data type, a data type which represents some finite subset of the mathematical integers. Integral data types may be of different sizes and may or may not be allowed to contain negative values....

 arithmetic
Arithmetic
Arithmetic or arithmetics is the oldest and most elementary branch of mathematics, used by almost everyone, for tasks ranging from simple day-to-day counting to advanced science and business calculations. It involves the study of quantity, especially as the result of combining numbers...

, and no arrays. Example:

R:Assign arithmetic mean
Arithmetic mean
In mathematics and statistics, the arithmetic mean, often referred to as simply the mean or average when the context is clear, is a method to derive the central tendency of a sample space...

 of #X and #Y to #AM

C:#AM=(#X+#Y)/2


D: Dimension an array, on some implementations.

E: End (return from) subroutine
Subroutine
In computer science, a subroutine is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code....

 or (if outside of a subroutine) abort program. Always used without any operand.

J: Jump to label. Example:

J:*RESTART


M: Match the accept buffer against string variables or string literal
String literal
A string literal is the representation of a string value within the source code of a computer program. There are numerous alternate notations for specifying string literals, and the exact notation depends on the individual programming language in question...

s. Example:

R:Search accept buffer for "TRUTH", the value of $MEXICO and "YOUTH", in that order

M:TRUTH,$MEXICO,YOUTH


The first match string (if any) that is a substring of the accept buffer is assigned to the special variable $MATCH. The buffer character
Character (computing)
In computer and machine-based telecommunications terminology, a character is a unit of information that roughly corresponds to a grapheme, grapheme-like unit, or symbol, such as in an alphabet or syllabary in the written form of a natural language....

s left of the first match are assigned to $LEFT, and the characters on the right are assigned to $RIGHT.

The match flag is set to 'yes' or 'no', depending on whether a match is made. Any statement that has a Y following the command letter is processed only if the match flag is set. Statements with N are processed only if the flag is not set.

N: Equivalent to TN: (type if last match unsuccessful)

R: The operand of R: is a comment
Comment (computer programming)
In computer programming, a comment is a programming language construct used to embed programmer-readable annotations in the source code of a computer program. Those annotations are potentially significant to programmers but typically ignorable to compilers and interpreters. Comments are usually...

, and therefore has no effect.

T: 'Type' operand as output. Examples:

R:Output a literal string

T:Thank you for your support.

R:Output a variable expression

T:Thank you, $NAME.


U: Use (call) a subroutine. A subroutine starts with a label and ends with E: Example:

R:Call subroutine starting at label *INITIALIZE

U:*INITIALIZE


Y: Equivalent to TY: (type if last match successful)

Parentheses: If there is parenthesized expression in a statement, it is a conditional expression, and the statement is processed only if the test has a value of 'true'. Example:

R:Type message if x>y+z

T(#X>#Y+#Z):Condition met

Derivatives

Extensions to core PILOT include arrays and floating point
Floating point
In computing, floating point describes a method of representing real numbers in a way that can support a wide range of values. Numbers are, in general, represented approximately to a fixed number of significant digits and scaled using an exponent. The base for the scaling is normally 2, 10 or 16...

 numbers in Apple PILOT, and implementation of LOGO-inspired turtle graphics
Turtle graphics
Turtle graphics is a term in computer graphics for a method of programming vector graphics using a relative cursor upon a Cartesian plane...

 in Atari
Atari
Atari is a corporate and brand name owned by several entities since its inception in 1972. It is currently owned by Atari Interactive, a wholly owned subsidiary of the French publisher Atari, SA . The original Atari, Inc. was founded in 1972 by Nolan Bushnell and Ted Dabney. It was a pioneer in...

 PILOT.

Versions of PILOT overlaid on the BASIC
BASIC
BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use - the name is an acronym from Beginner's All-purpose Symbolic Instruction Code....

 interpreters of early microcomputers were not unknown in the late 1970s and early 1980s, and Byte Magazine at one point published a non-Turing complete derivative of PILOT known as Waduzitdo by Larry Kheriarty as a way of demonstrating what a computer was capable of.
A 1983 product called Vanilla PILOT for the Commodore 64
Commodore 64
The Commodore 64 is an 8-bit home computer introduced by Commodore International in January 1982.Volume production started in the spring of 1982, with machines being released on to the market in August at a price of US$595...

 combined some features of LOGO.

In 1991 the Institute of Electrical and Electronics Engineers
Institute of Electrical and Electronics Engineers
The Institute of Electrical and Electronics Engineers is a non-profit professional association headquartered in New York City that is dedicated to advancing technological innovation and excellence...

(IEEE) published a standard for Pilot as IEEE Std 1154-1991. It has since been withdrawn.

An open source implementation was called RPilot, and another called Sky Pilot begun in 2005.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK