Syntax Summary |
Top Previous |
FACTORS SECTION
CONSTANTS: Decimal integers: 123 . . . . . . . . Integer Constants Hexadecimal integers: $FE00 . . . . . . Hex Constants ASCII characters: ^A . . . . . . . . ASCII Constants Real numbers: 6.023E23 . . . . . . . . Real Constants Declared constants: define Pi=3.14; . . Declarations, Constant Expression True and false . . . . . . . . . . True and False VARIABLES: Integers . . . . . . . . . . . . Variables Reals . . . . . . . . . . . . . Variables Array elements . . . . . . . . . . . Arrays FUNCTIONS . . . . . . . . . . . . . . . . . Functions INTRINSICS that return a value . . . . . . . . . . Intrinsics EXTERNALS that return a value . . . . . . . . . . . Assembly-Language Externals TEXT STRINGS: "..." . . . . . . . . . . . . . . Strings CONSTANT ARRAYS: [CONSTANT, ... CONSTANT] . . . . . . Constant Array ADDRESS of a variable or array: addr Frog . . . . . . Address Operator
OPERATORS
The operator precedence (priority) is shown in parentheses; 1 is highest.
Unary minus (or plus): - (+) (1) . . . . . . . . . Unary Operators Shift left: << (2) . . . . . . . . . Shift Operators Shift right: >> (2) . . . . . . . . . Shift Operators Multiplication: * (3) . . . . . . . . . Arithmetic Expressions Division: / (3) . . . . . . . . . Arithmetic Expressions Addition: + (4) . . . . . . . . . Arithmetic Expressions Subtraction: - (4) . . . . . . . . . Arithmetic Expressions Equal: = (5) . . . . . . . . . Comparisons Not equal: # (5) . . . . . . . . . Comparisons Less than: < (5) . . . . . . . . . Comparisons Less than or equal: <= (5) . . . . . . . . . Comparisons Greater than: > (5) . . . . . . . . . Comparisons Greater than or equal: >= (5) . . . . . . . . . Comparisons Boolean "not": ~ (6) . . . . . . . . . Boolean Expressions Boolean "and": & (7) . . . . . . . . . Boolean Expressions Boolean "or": ! (8) . . . . . . . . . Boolean Expressions Boolean "exclusive or": | (8) . . . . . . . . . Boolean Expressions If expression: if (9) . . . . . . . . . If Expression
SPECIAL CHARACTERS
Space, tab, carriage return, and form feed are formatters . Free Format () Expression evaluation priority, arguments, and subscripts. Arithmetic Expressions, Subroutine Calls, Arguments, Arrays ; Statement and procedure separator and declaration terminator \ Comment (except in strings and "include" path names) Comments ^ ASCII constants, and ", ^ and ctrl chars in strings ASCII Constants, Strings _ Underline is a legal character in a name . . . . Variables
STATEMENTS
VARIABLE:= EXPRESSION; . . . . . . . . . . . . . Assignments begin STATEMENT; STATEMENT; ... STATEMENT end; . . . . . Begin - end [STATEMENT; STATEMENT; ... STATEMENT]; . . . . . . . . Begin - end if BOOLEAN EXPRESSION then STATEMENT; . . . . . . . . If - then - else if BOOLEAN EXPRESSION then STATEMENT else STATEMENT; . . . If - then - else case of . . . . . . . . . . . . . . . . . . Case - of - other BOOLEAN EXPRESSION, ... BOOLEAN EXPRESSION: STATEMENT; ... BOOLEAN EXPRESSION, ... BOOLEAN EXPRESSION: STATEMENT other STATEMENT; case INTEGER EXPRESSION of . . . . . . . . . . . . Case - of - other INTEGER EXPRESSION, ... INTEGER EXPRESSION: STATEMENT; ... INTEGER EXPRESSION, ... INTEGER EXPRESSION: STATEMENT other STATEMENT; while BOOLEAN EXPRESSION do STATEMENT; . . . . . . . . While - do repeat STATEMENT; ... STATEMENT until BOOLEAN EXPRESSION; . . Repeat - until loop STATEMENT; . . . . . . . . . . . . . . . . Loop - quit quit; . . . . . . . . . . . . . . . . . . . Loop - quit for VARIABLE:= INTEGER EXPRESSION, INTEGER EXPRESSION . . . For - do do STATEMENT; exit; . . . . . . . . . . . . . . . . . . . Exit exit BYTE EXPRESSION; . . . . . . . . . . . . . . Exit SUBROUTINE NAME(EXPRESSION, ... EXPRESSION); . . . . . Subroutine Calls, Procedures return; . . . . . . . . . . . . . . . . . . Return return EXPRESSION; . . . . . . . . . . . . . . . Functions ; (null statement) . . . . . . . . . . . . . . Null Statements
DECLARATIONS
integer NAME, NAME, ... NAME; . . . . . . . . . . . Declarations real NAME, NAME, ... NAME; . . . . . . . . . . . . Declarations define NAME=CONSTANT, ... NAME=CONSTANT; . . . . . . . Declared Constants define NAME, NAME, ... NAME; . . . . . . . . . . . Declared Constants procedure NAME(COMMENT); . . . . . . . . . . . . Procedures function TYPE NAME(COMMENT); . . . . . . . . . . . Functions code TYPE NAME(COMMENT)=INTEGER, ... NAME(COMMENT)=INTEGER; . Intrinsics fprocedure NAME(COMMENT), NAME(COMMENT), ... NAME(COMMENT); . Forward Procedures ffunction TYPE NAME(COMMENT), NAME(COMMENT), ... NAME(COMMENT); Forward Functions eprocedure NAME(COMMENT), NAME(COMMENT), ... NAME(COMMENT); . External Procedures efunction TYPE NAME(COMMENT), NAME(COMMENT), ... NAME(COMMENT); External Procedures public procedure NAME(COMMENT); . . . . . . . . . . External Procedures public function TYPE NAME(COMMENT); . . . . . . . . . External Procedures external TYPE NAME(COMMENT), NAME(COMMENT), ... NAME(COMMENT); Assembly-Language Externals integer NAME(DIMENSIONS), ... NAME(DIMENSIONS); . . . . . Arrays real NAME(DIMENSIONS), ... NAME(DIMENSIONS); . . . . . . Arrays character NAME(DIMENSIONS), ... NAME(DIMENSIONS); . . . . Arrays segment TYPE NAME(DIMENSION), ... NAME(DIMENSION); . . . . Segment Arrays . |