PILOT

For information on payments in lieu of taxes, see PILOT (finance).

The name PILOT is an acronym, and stands for Programmed Instruction, Learning, Or Teaching. Like its elder sibling LOGO it was an early foray into the technology of computer assisted instruction (CAI).

Language syntax

A line of PILOT code contains (from left to right) the following syntax elements:

  • an optional label
  • a command letter
  • an optional Y (for yes) or N (for no)
  • an optional conditional expression in parentheses
  • a colon (":")
  • an operand, or multiple operands delimited 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".

A:

Accept input into "accept buffer".

Examples:

R:Next line of input replaces current contents of accept buffer

A:

R:Next line of input replaces accept buffer, and string variable '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.

Example:

R:Assign arithmetic mean of #X and #Y to #AM

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

Most PILOT implementations have only integer arithmetic, and no arrays.

D:

Dimension an array, on some implementations.

E:

End (return from) subroutine. Always used without any operand.

J:

Jump to label.

Example:

J:*RESTART

M:

Match the accept buffer against string variables or literals.

Example:

A: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 characters 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, and therefore not processed.

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 test 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

Extension features

Extensions to core pilot include arrays and floating point numbers in Apple PILOT, and implementation of LOGO-inspired turtle graphics in Atari PILOT.

de:PILOT

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools