Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
PILOT
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===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/output|input]] into "accept [[Buffer (computer science)|buffer]]". Examples: R:Next line of input replaces current contents of accept buffer A: R:Next line of input replaces accept buffer, and [[string (computer science)|string]] [[variable (programming)|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. Most PILOT implementations have only [[integer (computer science)|integer]] [[arithmetic]], and no [[Array data structure|arrays]]. Example: R:Assign [[arithmetic mean]] of #X and #Y to #AM C:#AM=(#X+#Y)/2 ; D: Dimension an array, on some implementations. ; E: End (return from) [[subroutine]] or (if outside of a subroutine) abort program. Always used without any operand. ; J: Jump to a label. Example: <pre> J:*RESTART </pre> ; M: Match the accept buffer against string variables or [[string literal]]s. Example: <pre> R:Search accept buffer for "TRUTH", the value of MEXICO and "YOUTH", in that order M:TRUTH,$MEXICO,YOUTH </pre> The first match string (if any) that is a substring of the accept buffer is assigned to the special variable $MATCH. The buffer [[character (computing)|character]]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 (computer programming)|comment]], and therefore has no effect. ; T: 'Type' operand as output. Examples: <pre> R:The next line prints a literal string T:Thank you for your support. R:The next line combines a literal string with a variable expression T:Thank you, $NAME. </pre> ; U: Use (call) a subroutine. A subroutine starts with a label and ends with E: Example: <pre> R:Call subroutine starting at label *INITIALIZE U:*INITIALIZE </pre> ; Y: Equivalent to TY: (type if last match successful) ; Parentheses: If there is a parenthesized expression in a statement, it is a [[conditional (programming)|conditional]] expression, and the statement is processed only if the test has a value of 'true'. Example: <pre> R:Type message if x>y+z T(#X>#Y+#Z):Condition met </pre>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
PILOT
(section)
Add topic