home *** CD-ROM | disk | FTP | other *** search
- ActualParameters
-
- ’– ( ’„’– <ExpList> ’’”– ) ’’–
- ‹ ‹
- ›’’’’’’’’’’’’’“
- AddOperator
-
- ’’„’– + ’’’”’–
- †’– - ’’’œ
- ›’– OR ’’“
- ArrayType
-
- ”’’’’’’ , —’’’’„
- ‹ ‹
- ’– ARRAY ’›– <SimpleType> ’“’’– OF ’– <Type> ’’–
- Assignment
-
- ’– <Designator> ’– := ’– <Expression> ’’–
- Block
-
- ”’ <Declaration> —„
- ‹ ‹
- ’’›’’’’’’’’’’’’’’’“’’„’– BEGIN ’– <StatementSequence> ’”’– END ’–
- ‹ ‹
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
- Case
-
- ’„’– <CaseLabelList> ’– : ’– <StatementSequence> ’”’–
- ‹ ‹
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“CaseLabels
-
- ’– <ConstExpression> ’„’– .. ’– <ConstExpression> ’’”’’–
- ‹ ‹
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’“CaseLabelList
-
- ”’’’’’’ , —’’’’’„
- ‹ ‹
- ’’›’– <CaseLabels> ’“’’–
- CaseStatement
-
- ”’’’ | —’’„
- ‹ ‹
- ’’– CASE ’– <Expression> ’– OF ’’›’– <Case> ’“’’„ ”’–
- ‹ ‹
- ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
- ‹ ‹
- ›’„’’– ELSE ’– <StatementSequence> ’’”’’– END ’’’’’“
- ‹ ‹
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
- CompilationUnit
-
- ’’„’’’’’’’’’’’’’’– <DefinitionModule> ’’’’’’’’’”’–
- ‹ ‹
- ›’„’– IMPLEMENTATION ’’”’– <ProgramModule> ’’“
- ›’’’’’’’’’’’’’’’’’’’’“
- ConstantDeclaration
-
- ’– <Ident> ’– = ’– <ConstantExpression> ’’’’–
- ConstExpression
-
- ’’’– <Expression> ’’’–
- Declaration
-
- ”’ ; — <ConstantDeclaration> —„
- ’„’– CONST ’›’’’’’’’’’’’’’’’’’’’’’’’’’’’“’’”’–
- ‹ ”’ ; — <TypeDeclaration> —„ ‹
- †’– TYPE ’’›’’’’’’’’’’’’’’’’’’’’’’’“’’’’’’œ
- ‹ ”’ ; — <VariableDeclaration> —„ ‹
- †’– VAR ’’’›’’’’’’’’’’’’’’’’’’’’’’’’’’’“’’œ
- ‹ ‹
- †’’’’’’– <ProcedureDeclaration> ’’– ; ’’’’’’œ
- ‹ ‹
- ›’’’’’’– <ModuleDeclaration> ’’’’’– ; ’’’’’’“
- Definition
-
- ”’ ; — <ConstantDeclaration> —„
- ’„’– CONST ’›’’’’’’’’’’’’’’’’’’’’’’’’’’’“’’’’’’”’–
- ‹ ‹
- ‹ ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’„ ‹
- †’– TYPE „’›– <Ident> ’„– = ’– <Type> ’”’– ; ’“’”’œ
- ‹ ‹ ›’’’’’’’’’’’’’“ ‹ ‹
- ‹ ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
- ‹ ”’ ; — <VariableDeclaration> —„ ‹
- †’– VAR ’’’›’’’’’’’’’’’’’’’’’’’’’’’’’’’“’’’’’’œ
- ‹ ‹
- ›’’’’’’’’’– <ProcedureHeading> ’’’– ; ’’’’’’’’’’“
- DefinitionModule
-
- ’’– DEFINITION ’– MODULE ’– <Ident> ’– ; ’„ ”’–
- ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
- ‹ ”’ <Import> —„ ”’ <Definition> —„ ‹
- ›’’›’’’’’’’’’’“’›’’’’’’’’’’’’’’“’– END ’– <Ident> ’– .’“
- Designator
-
- ”’’’’’’’’’’’’’’’’’’’’’’’’’’’„
- ‹ ‹
- ‹ ”’– . ’’’– <Ident> ’’’’’’’„ ‹
- ‹ ‹ ‹ ‹
- ’’– <Qualident> ’„’’›’œ’– [ ’– <ExpList> ’– ] ’’†’“’’”’–
- ‹ ‹ ‹ ‹
- ‹ ›’’’’’’’’’’– ^ ’’’’’’’’’“ ‹
- ‹ ‹
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
- Digit
-
- ’„’’– <OctalDigit> ’’”’–
- †’’’’’’– 8 ’’’’’’’œ
- ›’’’’’’– 9 ’’’’’’’“
- Element
-
- ’’– <Expression> ’’„’– .. ’– <Expression> ’’”’’–
- ›’’’’’’’’’’’’’’’’’’’’’’“
- Enumeration
-
- ’– ( ’– <IdentList> ’– ) ’–
- ExpList
-
- ”’’’’’’’ , —’’’’„
- ‹ ‹
- ’’›’– <Expression> ’“’–
- Export
-
- ’– EXPORT ’„’– <Qualident> ’’”– <IdentList> ’– ; ’–
- ›’’’’’’’’’’’’’’’“
- Expression
-
- ’– <SimpleExpression> ’„’– <Relation> ’– <SimpleExpression> ’’”’’–
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
- Factor
-
- ’„’’’’’’’’’’’’’’’’– <Number> ’’’’’’’’’’’’’’”–
- †’’’’’’’’’’’’’’’’– <String> ’’’’’’’’’’’’’’œ
- †’’’’’’’’’’’’’’’’– <Set> ’’’’’’’’’’’’’’’’’œ
- †’– <Designator> ’„’– <ActualParameters> ’”’œ
- ‹ ›’’’’’’’’’’’’’’’’’’’’’“ ‹
- †’’’’’– ( ’’’’’– <Expression> ’’’’– ) ’’’’œ
- ‹ ‹
- ›’’’– NOT ’’’’’’’’’’’’’’’– Factor ’’’’’’“
- FieldList
-
- ’„’’’’’’’’’’– <IdentList> ’’’’’’’’– : ’’’’’’’’’’– <Type> ’’’’’’’’’”’–
- ‹ ‹
- †’– CASE ’„’– <Ident> ’’”– : ’– OF ’„ ‹
- ‹ ›’’’’’’’’’’’“ ‹ ‹
- ‹ ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
- ‹ ‹ ”’’’’’ | —’’’’„ ‹
- ‹ ‹ ‹ ‹ ‹
- ‹ ›’›’– <Variant> ’’“’„’– ELSE ’– <FieldListSequence> ’’”– END ’’œ
- ‹ ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
- FieldListSequence
-
- ”’’’’’’’’’’’’’„
- ‹ ‹
- ’’’›– <FieldList> ’“’’–
- FormalParameters
-
- ”’’’’’’ ; —’’’’„
- ’– ( ’„’’›’– <FPSection> ’“’’”– ) ’„’– : ’– <Qualident> ’’”’’–
- ›’’’’’’’’’’’’’’’’’’’’“ ›’’’’’’’’’’’’’’’’’’’’“
- FormalType
-
- ’’„’– ARRAY ’– OF ’’”’– <Qualident> ’’–
- ›’’’’’’’’’’’’’’’’’“
- ForStatement
-
- ’– FOR ’– <Ident> ’– := ’– <Expression> ’– TO ’– <Expression> ’„ ”’–
- ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
- ›’„’– BY ’– <ConstantExpression> ’”– DO ’– <StatementSequence> – END ’“
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
- FPSection
-
- ’’„’– VAR ’’”– <IdentList> ’’– : ’– <FormalType> ’’’–
- ›’’’’’’’’’“
- FormalTypeList
-
- ”’’’’’’’’’’’’ , —’’’’’’’’’’„
- ‹ ‹
- ’– ( ’„’›’„’– VAR ’’”– <FormalType> ’“’’”– ) ’’„’– : ’– <Qualident> ’’”’–
- ‹ ›’’’’’’’’’“ ‹ ›’’’’’’’’’’’’’’’’’’’’“
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
- HexDigit
-
- ’„’– <Digit> ’”’–
- †’’’– A ’’’œ
- †’’’– B ’’’œ
- †’’’– C ’’’œ
- †’’’– D ’’’œ
- †’’’– E ’’’œ
- ›’’’– F ’’’“
- Ident
-
- ”’„’ Letter —”’„
- ‹ ›’ <Digit> —’“ ‹
- ’– Letter ’’›’’’’’’’’’’’’’’“’’–
- IdentList
-
- ”’’’’ , —’’’„
- ‹ ‹
- ’’›’– <Ident> ’’“’’–
- IfStatement
-
- ’’’’’’’’’– IF ’’’’– <Expression> ’– THEN ’– <StatementSequence> ’’’– ..
-
- ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’„
- ..’’„’’›’– ELSIF ’– <Expression> ’– THEN ’– <StatementSequence> ’“’”’– ..
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
-
- ..’’„’– ELSE ’’’’’’’’’– <StatementSequence> ’’”’– END ’’–
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
- Import
-
- ’„’– FROM ’– <Ident> ’”– IMPORT ’– <IdentList> ’– ; ’–
- ›’’’’’’’’’’’’’’’’’’“
- Integer
-
- ”’’’’’’’’’’’„
- ’„’’’’’’’’’’’’’›’– <Digit> ’’“’’’’’’’”’–
- ‹ ”’’’’’’’’’’’’’’’’„ ”’– B ’’„ ‹
- †’’’›’– <OctalDigit> ’’“’’“’– C ’’›’œ
- ‹ ”’’ <Hexdigit> —’„ ‹
- ›’– Digit ’›’’’’’’’’’’’’’’“’’– H ’“
- LoopStatement
-
- ’– LOOP ’– <StatementSequence> ’– END ’–
- Modula 2
- This is an example Help "Application".
- Please ensure that "Redefine chars" is on.
-
- Modula 2 is a general-purpose programming
- language, created by Niclaus Wirth; the
- father of Pascal.
-
- If you know Pascal, you know Modula 2.
- Modula 2 is not available on the Archimedes
- yet, but I'm working on it.. Well, I was..
- Maybe I'll continue.. or maybe not..
-
- In the mean time, you can take a look at
- Modula 2s <syntax=>M2-Syntax>, or at this small
- <example=>M2-example> program.Hello World
- MODULE HelloWorld;
-
- FROM IO IMPORT WriteString;
-
- VAR X : INTEGER;
-
- BEGIN
- FOR X := 0 TO 9 DO
- WriteString("Hello World!");
- END;
- END HelloWorld.Modula 2
- < ActualParameters >
- < AddOperator >
- < ArrayType >
- < Assignment >
- < Block >
- < Case >
- < CaseLabelList >
- < CaseLabels >
- < CaseStatement >
- –<CompilationUnit >
- < ConstantDeclaration >
- < ConstantExpression >
- < Declaration >
- < Definition >
- < DefinitionModule >
- < Designator >
- < Digit >
- < Element >
- < Enum >
- < ExpList >
- < Export >
- < Expression >
- < Factor >
- < FieldList >
- < FieldListSequence >
- < FormalParameters >
- < FormalType >
- < FormalTypeList >
- < ForStatement >
- < FPSection >
- < HexDigit >
- < Ident >
- < IdentList >
- < IfStatement >
- < Import >
- < Integer >
- < LoopStatement >
- < ModuleDeclaration >
- < MulOperator >
- < Number >
- < OctalDigit >
- < PointerType >
- < Priority >
- < ProcedureCall >
- < ProcedureDeclaration>
- < ProcedureHeading >
- < ProcedureType >
- < ProgramModule >
- < Qualident >
- < Real >
- < RecordType >
- < Relation >
- < RepeatStatement >
- < ScaleFactor >
- < Set >
- < SetType >
- < SimpleExpression >
- < SimpleType >
- < Statement >
- < StatementSequence >
- < String >
- < SubrangeType >
- < Term >
- < Type >
- < TypeDeclaration >
- < VariableDeclaration >
- < Variant >
- < WhileStatement >
- < WithStatement >ModuleDeclaration
-
- ’’– MODULE ’’– <Ident> ’’„’’– <Priority> ’’”– ; ’’„ ”’–
- ›’’’’’’’’’’’’’’’“ ‹ ‹
- ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
- ‹ ”’ <Import> —„ ‹
- ›’’›’’’’’’’’’’“’’„’– <Export> ’’”’– <Block> ’– <Ident> ’– . ’’“
- ›’’’’’’’’’’’’“
- MulOperator
-
- ’’’„’– * ’’’’”’–
- †’– / ’’’’œ
- †’– DIV ’’œ
- †’– MOD ’’œ
- ›’– AND ’’“
- Number
-
- ’’„’– <Integer> ’”’–
- ›’– <Real> ’’’’“
- OctalDigit
-
- ’’’„’– 0 ’’”’’–
- †’– 1 ’’œ
- †’– 2 ’’œ
- †’– 3 ’’œ
- †’– 4 ’’œ
- †’– 5 ’’œ
- †’– 6 ’’œ
- ›’– 7 ’’“
- PointerType
-
- ’’– POINTER ’– TO ’– <Type> ’’–
- ProgramModule
-
- ’– MODULE ’– <Ident> ’„’– <Priority> ’’”– ; ’„ ”’–
- ›’’’’’’’’’’’’’’“ ‹ ‹
- ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
- ‹ ”’ <Import> —„ ‹
- ›’’›’’’’’’’’’’“’’– <Block> ’– <Ident> ’– . ’’’“
- Priority
-
- ’– [ ’– <ConstantExpression> ’– ] ’–
- ProcedureCall
-
- ’– <Designator> ’„’– <ActualParameters> ’’”’’–
- ›’’’’’’’’’’’’’’’’’’’’’’“
- ProcedureDeclaration
-
- ’– <ProcedureHeading> ’– ; ’– <Block> ’– <Ident> ’’’–
- ProcedureHeading
-
- ’– PROCEDURE ’– <Ident> ’„’– <FormalParameters> ’”’–
- ›’’’’’’’’’’’’’’’’’’’’’“
- ProcedureType
-
- ’– PROCEDURE ’„’– <FormalTypeList> ’’”’’–
- ›’’’’’’’’’’’’’’’’’’’’“
- Qualident
-
- ”’’’’ . —’’’„
- ‹ ‹
- ’’›’– <Ident> ’’“’’–
- Real
-
- ”’’’’’’’’’’’„ ”’’ <Digit> —’„
- ’’›’– <Digit> ’’“’’– . ’’›’’’’’’’’’’’“’’„’– <ScaleFactor> ’’”’–
- ›’’’’’’’’’’’’’’’’’“
- RecordType
-
- ’– RECORD ’– <FieldListSequence> ’– END ’–
- Relation
-
- ’’„’– = ’’”’’–
- †’– # ’’œ
- †’– \< ’’œ
- †’– \<= ’œ
- †’– > ’’œ
- †’– >= ’œ
- ›’– IN ’“
- RepeatStatement
-
- ’– REPEAT ’– <StatementSequence> ’– UNTIL ’– <Expression> ’–
- ScaleFactor
-
- ”’’– + ’’„ ”’’’’’’’’’’’„
- ’’– E ’œ’’’’’’’’†’’’›’– <Digit> ’’“’’’–
- ›’’– - ’’“
- Set
- ”’’’’’ , —’’’„
- ’„’– <Qualident> ’’”– { ’„’’›’– <Element> ’“’’”’– } ’–
- ›’’’’’’’’’’’’’’’“ ›’’’’’’’’’’’’’’’’’’“
- SetType
-
- ’’– SET ’– OF ’– <SimpleType> ’’–
- SimpleExpression
-
- ”’– + ’’„ ”’’ <AddOperator> —„
- ’’œ’’’’’’’†’’’›’’’’– <Term> ’’’’’“’’’–
- ›’– - ’’“
- SimpleType
-
- ’„’– <Qualident> ’’’’’”’’–
- †’– <Enumeration> ’’’œ
- ›’– <SubrangeType> ’’“
- Statement
-
- ’„’– <Assignment> ’’’’’’’’’’’’’’’’”’’–
- †’– <ProcedureCall> ’’’’’’’’’’’’’œ
- †’– <IfStatement> ’’’’’’’’’’’’’’’œ
- †’– <CaseStatement> ’’’’’’’’’’’’’œ
- †’– <WhileStatement> ’’’’’’’’’’’’œ
- †’– <RepeatStatement> ’’’’’’’’’’’œ
- †’– <LoopStatement> ’’’’’’’’’’’’’œ
- †’– <ForStatement> ’’’’’’’’’’’’’’œ
- †’– <WithStatement> ’’’’’’’’’’’’’œ
- †’– EXIT ’’’’’’’’’’’’’’’’’’’’’’œ
- †’– RETURN ’„’– <Expression> ’’”’œ
- ‹ ›’’’’’’’’’’’’’’’’“ ‹
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
- StatementSequence
-
- ”’’’’’’’ ; ’’’’’„
- ‹ ‹
- ’’›’– <Statement> ’’“’’–
- String
-
- ”’ Character —’„
- ’’„’– ' ’’›’’’’’’’’’’’’’’“’’– ' ’’”’’–
- ‹ ”’ Character —’„ ‹
- ›’– " ’’›’’’’’’’’’’’’’’“’’– " ’’“
- SubrangeType
-
- ’„’– <Qualident> ’’”– [– <ConstantExpression> –..– <ConstantExpression> –] –
- ›’’’’’’’’’’’’’’’“
- Term
-
- ”’’ <MulOperator> —’„
- ’’›’’’’– <Factor> ’’’’“’’’–
- Type
-
- ’„’– <SimpleType> ’’’’”’–
- †’– <ArrayType> ’’’’’œ
- †’– <RecordType> ’’’’œ
- †’– <SetType> ’’’’’’’œ
- †’– <PointerType> ’’’œ
- ›’– <ProcedureType> ’“
- TypeDeclaration
-
- ’– <Ident> ’– = ’– <Type> ’’’’–
- VariableDeclaration
-
- ’– <IdentList> ’– : ’– <Type> ’’’’–
- Variant
-
- ’’„’– <CaseLabelList> ’– : ’– <FieldListSequence> ’’’”’’–
- ‹ ‹
- ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“WhileStatement
-
- ’– WHILE ’– <Expression> ’– DO ’– <StatementSequence> ’– END ’–
- WithStatement
-
- ’– WITH ’– <Designator> ’– DO ’– <StatementSequence> ’– END ’’–
-