Go to the first, previous, next, last section, table of contents.
Declarations bind names with values or types. They appear in the
outermost level of module interfaces and implementations after the IMPORT
statement, as well as at the beginning of blocks. Kinds of declarations
include constants, types, variables, procedures, and exceptions.
They can appear in any order.
- Decl Examples: Examples of common declarations
- Constants: CONST <id> "=" <const expr> ";"
- Types: TYPE <id> "=" <type> ";"
- Variables: VAR <id> [ ":" <type> ] [ ":=" <expr> ] ";"
- Procedures: PROCEDURE <id> <sig> "=" <body> <id> ";"
- Exceptions: EXCEPTION <id> [ "(" <parm type> ")" ] ";"
Go to the first, previous, next, last section, table of contents.