~ Office Supplies ~~ Buy Posters ~~ A-Z Products ~~ Website Advertising


PILOT programming language - Wikipedia

<<Up     Contents

PILOT programming language

The name is an acronym, and stands for "Programmed Instruction, Learning or Teaching". It was an early foray into the technology of Computer Assisted Instruction (CAI).

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

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).


The command letters used in Pilot are as follows:

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)


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


The above is a description (but not a definition) of "core pilot". Extensions to core pilot include arrays and floating point numbers in Apple PILOT, and implementation of turtle graphics in Atari PILOT.

wikipedia.org dumped 2003-03-17 with terodump




 
 
15 carats royal blue AFGHANITE crystal gem mineral specimen cabbing cabochon rough gemstone BEAUTY
 15 carats royal blue AFGHANITE crystal mineral specimen cabbing cabochon BEAUTY 
 
29 carat yellow Golden TIGER EYE Quartz raw uncut facet grade rough gemstone Tigereye gem stone 5 gr
 29 carat yellow Golden TIGER EYE Quartz raw uncut grade Tigereye 5 gr 
 
29 gram pink red RHODOCHROSITE gem stone Cab cabbing cabochon rough tumbled jewelry 145 carat PRETTY
 29 gram pink red RHODOCHROSITE Cab cabbing cabochon tumbled jewelry 145 carat PRETTY 
 
32 carats pink red RHODOCHROSITE cabbing raw uncut rough tumble polished jewelry gemstone piece 6 gr
 32 carats pink red RHODOCHROSITE cabbing raw uncut tumble polished jewelry piece 6 gr 
 
Dendritic Pink Peru OPAL jewel tumble polished jewelry gemstone single gorgeous PRETTY NICE peruvian
 Dendritic Pink Peru OPAL jewel tumble polished jewelry single gorgeous PRETTY NICE peruvian