PILOT Language Reference (Educational)

PILOT is an interactive educational programming language inspired by the classic Atari/PLATO system. PBXB64 supports standalone .pil files and inline #PCODE blocks in BASIC programs.

Core Commands

CommandDescription
T:Type (print) text to output
A:Accept (read) input from user into $answer
M:Match input against pattern, sets match variables
Y:Yes - execute next line if match succeeded
N:No - execute next line if match failed
C:Compute (assign variable or expression)
J:Jump to labeled line
U:Use (call subroutine at label)
E:End (return from subroutine or terminate program)
R:Remark (comment line, ignored by interpreter)
S:Sound (generate system beep)
D:Dimension (declare array/table)

Standalone .pil Example

T: Welcome to PILOT!
A: What is your name?
T: Hello, $answer! Nice to meet you.
C: age = 10 + 5
T: In five years you will be $age.
E:

Embedded #PCODE Block

#COMPILE EXE "program.exe"
#DIM ALL

FUNCTION PBMAIN() AS LONG
    #PCODE
    T: Interactive Quiz Mode
    A: What is 2 + 3?
    M: 5
    Y: Correct! Well done.
    N: Try again next time.
    E:
    #ENDP
    FUNCTION = 0
END FUNCTION

Match Variables (Auto-Set by M:)

VariableDescription
$answerLast accepted input string
$matchThe portion of $answer that matched the pattern
$leftText before the match in $answer
$rightText after the match in $answer
#posStarting position of match (0-based)
Educational Use: PILOT is ideal for teaching conditional logic, string matching, and interactive program flow. Combine with BASIC for hybrid educational tools.