home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / s / stronged / !M2 / Modula2 / Helpdata next >
Encoding:
Text File  |  1992-12-12  |  12.7 KB  |  483 lines

  1. ActualParameters
  2.  
  3. ’– ( ’„’– <ExpList> ’’”– ) ’’–
  4.       ‹             ‹
  5.       ›’’’’’’’’’’’’’“
  6. AddOperator
  7.  
  8. ’’„’– + ’’’”’–
  9.   †’– - ’’’œ
  10.   ›’– OR ’’“
  11. ArrayType
  12.  
  13.           ”’’’’’’ , —’’’’„
  14.           ‹              ‹
  15. ’– ARRAY ’›– <SimpleType> ’“’’– OF ’– <Type> ’’–
  16. Assignment
  17.  
  18. ’– <Designator> ’– := ’– <Expression> ’’–
  19. Block
  20.  
  21.   ”’ <Declaration> —„
  22.   ‹               ‹
  23. ’’›’’’’’’’’’’’’’’’“’’„’– BEGIN ’– <StatementSequence> ’”’– END ’–
  24.                      ‹                               ‹
  25.                      ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  26. Case
  27.  
  28. ’„’– <CaseLabelList> ’– : ’– <StatementSequence> ’”’–
  29.  ‹                                            ‹
  30.  ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“CaseLabels
  31.  
  32. ’– <ConstExpression> ’„’– .. ’– <ConstExpression> ’’”’’–
  33.                     ‹                           ‹
  34.                     ›’’’’’’’’’’’’’’’’’’’’’’’’’’’“CaseLabelList
  35.  
  36.   ”’’’’’’ , —’’’’’„
  37.   ‹               ‹
  38. ’’›’– <CaseLabels> ’“’’–
  39. CaseStatement
  40.  
  41.                                ”’’’ | —’’„
  42.                                ‹         ‹
  43. ’’– CASE ’– <Expression> ’– OF ’’›’– <Case> ’“’’„      ”’–
  44.                                             ‹      ‹
  45.   ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“      ‹
  46.   ‹                                                ‹
  47.   ›’„’’– ELSE ’– <StatementSequence> ’’”’’– END ’’’’’“
  48.     ‹                                ‹
  49.     ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  50. CompilationUnit
  51.  
  52. ’’„’’’’’’’’’’’’’’– <DefinitionModule> ’’’’’’’’’”’–
  53.   ‹                                          ‹
  54.   ›’„’– IMPLEMENTATION ’’”’– <ProgramModule> ’’“
  55.     ›’’’’’’’’’’’’’’’’’’’’“
  56. ConstantDeclaration
  57.  
  58. ’– <Ident> ’– = ’– <ConstantExpression> ’’’’–
  59. ConstExpression
  60.  
  61. ’’’– <Expression> ’’’–
  62. Declaration
  63.  
  64.             ”’ ; — <ConstantDeclaration> —„
  65. ’„’– CONST ’›’’’’’’’’’’’’’’’’’’’’’’’’’’’“’’”’–
  66.  ‹          ”’ ; — <TypeDeclaration> —„      ‹
  67.  †’– TYPE ’’›’’’’’’’’’’’’’’’’’’’’’’’“’’’’’’œ
  68.  ‹          ”’ ; — <VariableDeclaration> —„  ‹
  69.  †’– VAR ’’’›’’’’’’’’’’’’’’’’’’’’’’’’’’’“’’œ
  70.  ‹                                         ‹
  71.  †’’’’’’– <ProcedureDeclaration> ’’– ; ’’’’’’œ
  72.  ‹                                         ‹
  73.  ›’’’’’’– <ModuleDeclaration> ’’’’’– ; ’’’’’’“
  74. Definition
  75.  
  76.             ”’ ; — <ConstantDeclaration> —„
  77. ’„’– CONST ’›’’’’’’’’’’’’’’’’’’’’’’’’’’’“’’’’’’”’–
  78.  ‹                                             ‹
  79.  ‹          ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’„   ‹
  80.  †’– TYPE „’›– <Ident> ’„– = ’– <Type> ’”’– ; ’“’”’œ
  81.  ‹        ‹           ›’’’’’’’’’’’’’“        ‹ ‹
  82.  ‹        ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
  83.  ‹          ”’ ; — <VariableDeclaration> —„      ‹
  84.  †’– VAR ’’’›’’’’’’’’’’’’’’’’’’’’’’’’’’’“’’’’’’œ
  85.  ‹                                             ‹
  86.  ›’’’’’’’’’– <ProcedureHeading> ’’’– ; ’’’’’’’’’’“
  87. DefinitionModule
  88.  
  89. ’’– DEFINITION ’– MODULE ’– <Ident> ’– ; ’„             ”’–
  90.  ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“             ‹
  91.  ‹  ”’ <Import> —„ ”’ <Definition> —„                     ‹
  92.  ›’’›’’’’’’’’’’“’›’’’’’’’’’’’’’’“’– END ’– <Ident> ’– .’“
  93. Designator
  94.  
  95.                   ”’’’’’’’’’’’’’’’’’’’’’’’’’’’„
  96.                   ‹                           ‹
  97.                   ‹ ”’– . ’’’– <Ident> ’’’’’’’„ ‹
  98.                   ‹ ‹                       ‹ ‹
  99. ’’– <Qualident> ’„’’›’œ’– [ ’– <ExpList> ’– ] ’’†’“’’”’–
  100.                ‹    ‹                       ‹    ‹
  101.                ‹    ›’’’’’’’’’’– ^ ’’’’’’’’’“    ‹
  102.                ‹                                 ‹
  103.                ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  104. Digit
  105.  
  106. ’„’’– <OctalDigit> ’’”’–
  107.  †’’’’’’– 8 ’’’’’’’œ
  108.  ›’’’’’’– 9 ’’’’’’’“
  109. Element
  110.  
  111. ’’– <Expression> ’’„’– .. ’– <Expression> ’’”’’–
  112.                  ›’’’’’’’’’’’’’’’’’’’’’’“
  113. Enumeration
  114.  
  115. ’– ( ’– <IdentList> ’– ) ’–
  116. ExpList
  117.  
  118.   ”’’’’’’’ , —’’’’„
  119.   ‹               ‹
  120. ’’›’– <Expression> ’“’–
  121. Export
  122.  
  123. ’– EXPORT ’„’– <Qualident> ’’”– <IdentList> ’– ; ’–
  124.            ›’’’’’’’’’’’’’’’“
  125. Expression
  126.  
  127. ’– <SimpleExpression> ’„’– <Relation>  ’– <SimpleExpression> ’’”’’–
  128.                      ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  129. Factor
  130.  
  131. ’„’’’’’’’’’’’’’’’’– <Number> ’’’’’’’’’’’’’’”–
  132.  †’’’’’’’’’’’’’’’’– <String> ’’’’’’’’’’’’’’œ
  133.  †’’’’’’’’’’’’’’’’– <Set> ’’’’’’’’’’’’’’’’’œ
  134.  †’– <Designator> ’„’– <ActualParameters> ’”’œ
  135.  ‹               ›’’’’’’’’’’’’’’’’’’’’’“ ‹
  136.  †’’’’’– ( ’’’’’– <Expression> ’’’’– ) ’’’’œ
  137.  ‹                                       ‹
  138.  ›’’’– NOT ’’’’’’’’’’’’’’’– Factor ’’’’’’“
  139. FieldList
  140.  
  141. ’„’’’’’’’’’’– <IdentList> ’’’’’’’’– : ’’’’’’’’’’– <Type> ’’’’’’’’’”’–
  142.  ‹                                                            ‹
  143.  †’– CASE ’„’– <Ident> ’’”– : ’– OF ’„                          ‹
  144.  ‹         ›’’’’’’’’’’’“           ‹                          ‹
  145.  ‹ ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“                          ‹
  146.  ‹ ‹ ”’’’’’ | —’’’’„                                          ‹
  147.  ‹ ‹ ‹             ‹                                          ‹
  148.  ‹ ›’›’– <Variant> ’’“’„’– ELSE ’– <FieldListSequence> ’’”– END ’’œ
  149.  ‹                   ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“        ‹
  150.  ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  151. FieldListSequence
  152.  
  153.    ”’’’’’’’’’’’’’„
  154.    ‹             ‹
  155. ’’’›– <FieldList> ’“’’–
  156. FormalParameters
  157.  
  158.          ”’’’’’’ ; —’’’’„
  159. ’– ( ’„’’›’– <FPSection> ’“’’”– ) ’„’– : ’– <Qualident> ’’”’’–
  160.       ›’’’’’’’’’’’’’’’’’’’’“     ›’’’’’’’’’’’’’’’’’’’’“
  161. FormalType
  162.  
  163. ’’„’– ARRAY ’– OF ’’”’– <Qualident> ’’–
  164.   ›’’’’’’’’’’’’’’’’’“
  165. ForStatement
  166.  
  167. ’– FOR ’– <Ident> ’– := ’– <Expression> ’– TO ’– <Expression> ’„          ”’–
  168.   ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“          ‹
  169.   ›’„’– BY ’– <ConstantExpression> ’”– DO ’– <StatementSequence> – END ’“
  170.     ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  171. FPSection
  172.  
  173. ’’„’– VAR ’’”– <IdentList> ’’– : ’– <FormalType> ’’’–
  174.   ›’’’’’’’’’“
  175. FormalTypeList
  176.  
  177.         ”’’’’’’’’’’’’ , —’’’’’’’’’’„
  178.         ‹                          ‹
  179. ’– ( ’„’›’„’– VAR ’’”– <FormalType> ’“’’”– ) ’’„’– : ’– <Qualident> ’’”’–
  180.       ‹   ›’’’’’’’’’“                 ‹      ›’’’’’’’’’’’’’’’’’’’’“
  181.       ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  182. HexDigit
  183.  
  184. ’„’– <Digit> ’”’–
  185.  †’’’– A ’’’œ
  186.  †’’’– B ’’’œ
  187.  †’’’– C ’’’œ
  188.  †’’’– D ’’’œ
  189.  †’’’– E ’’’œ
  190.  ›’’’– F ’’’“
  191. Ident
  192.  
  193.             ”’„’ Letter —”’„
  194.             ‹ ›’ <Digit> —’“ ‹
  195. ’– Letter ’’›’’’’’’’’’’’’’’“’’–
  196. IdentList
  197.  
  198.   ”’’’’ , —’’’„
  199.   ‹           ‹
  200. ’’›’– <Ident> ’’“’’–
  201. IfStatement
  202.  
  203. ’’’’’’’’’– IF ’’’’– <Expression> ’– THEN ’– <StatementSequence> ’’’– ..
  204.  
  205.        ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’„
  206. ..’’„’’›’– ELSIF ’– <Expression> ’– THEN ’– <StatementSequence> ’“’”’– ..
  207.     ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  208.  
  209. ..’’„’– ELSE ’’’’’’’’’– <StatementSequence> ’’”’– END ’’–
  210.     ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  211. Import
  212.  
  213. ’„’– FROM ’– <Ident> ’”– IMPORT ’– <IdentList> ’– ; ’–
  214.  ›’’’’’’’’’’’’’’’’’’“
  215. Integer
  216.  
  217.                ”’’’’’’’’’’’„
  218. ’„’’’’’’’’’’’’’›’– <Digit> ’’“’’’’’’’”’–
  219.  ‹   ”’’’’’’’’’’’’’’’’„  ”’– B ’’„ ‹
  220.  †’’’›’– <OctalDigit> ’’“’’“’– C ’’›’œ
  221.  ‹          ”’’ <Hexdigit> —’„       ‹
  222.  ›’– Digit ’›’’’’’’’’’’’’’’“’’– H ’“
  223. LoopStatement
  224.  
  225. ’– LOOP ’– <StatementSequence> ’– END ’–
  226. Modula 2
  227. This is an example Help "Application".
  228. Please ensure that "Redefine chars" is on.
  229.  
  230. Modula 2 is a general-purpose programming
  231. language, created by Niclaus Wirth; the
  232. father of Pascal.
  233.  
  234. If you know Pascal, you know Modula 2.
  235. Modula 2 is not available on the Archimedes
  236. yet, but I'm working on it.. Well, I was..
  237. Maybe I'll continue.. or maybe not..
  238.  
  239. In the mean time, you can take a look at
  240. Modula 2s <syntax=>M2-Syntax>, or at this small
  241. <example=>M2-example> program.Hello World
  242. MODULE HelloWorld;
  243.  
  244. FROM   IO IMPORT WriteString;
  245.  
  246. VAR    X  : INTEGER;
  247.  
  248. BEGIN
  249.   FOR X := 0 TO 9 DO
  250.     WriteString("Hello World!");
  251.   END;
  252. END HelloWorld.Modula 2
  253. < ActualParameters    >
  254. < AddOperator         >
  255. < ArrayType           >
  256. < Assignment          >
  257. < Block               >
  258. < Case                >
  259. < CaseLabelList       >
  260. < CaseLabels          >
  261. < CaseStatement       >
  262. –<CompilationUnit     >
  263. < ConstantDeclaration >
  264. < ConstantExpression  >
  265. < Declaration         >
  266. < Definition          >
  267. < DefinitionModule    >
  268. < Designator          >
  269. < Digit               >
  270. < Element             >
  271. < Enum                >
  272. < ExpList             >
  273. < Export              >
  274. < Expression          >
  275. < Factor              >
  276. < FieldList           >
  277. < FieldListSequence   >
  278. < FormalParameters    >
  279. < FormalType          >
  280. < FormalTypeList      >
  281. < ForStatement        >
  282. < FPSection           >
  283. < HexDigit            >
  284. < Ident               >
  285. < IdentList           >
  286. < IfStatement         >
  287. < Import              >
  288. < Integer             >
  289. < LoopStatement       >
  290. < ModuleDeclaration   >
  291. < MulOperator         >
  292. < Number              >
  293. < OctalDigit          >
  294. < PointerType         >
  295. < Priority            >
  296. < ProcedureCall       >
  297. < ProcedureDeclaration>
  298. < ProcedureHeading    >
  299. < ProcedureType       >
  300. < ProgramModule       >
  301. < Qualident           >
  302. < Real                >
  303. < RecordType          >
  304. < Relation            >
  305. < RepeatStatement     >
  306. < ScaleFactor         >
  307. < Set                 >
  308. < SetType             >
  309. < SimpleExpression    >
  310. < SimpleType          >
  311. < Statement           >
  312. < StatementSequence   >
  313. < String              >
  314. < SubrangeType        >
  315. < Term                >
  316. < Type                >
  317. < TypeDeclaration     >
  318. < VariableDeclaration >
  319. < Variant             >
  320. < WhileStatement      >
  321. < WithStatement       >ModuleDeclaration
  322.  
  323. ’’– MODULE ’’– <Ident> ’’„’’– <Priority> ’’”– ; ’’„          ”’–
  324.                        ›’’’’’’’’’’’’’’’“      ‹          ‹
  325.  ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“          ‹
  326.  ‹  ”’ <Import> —„                                         ‹
  327.  ›’’›’’’’’’’’’’“’’„’– <Export> ’’”’– <Block> ’– <Ident> ’– . ’’“
  328.                   ›’’’’’’’’’’’’“
  329. MulOperator
  330.  
  331. ’’’„’– * ’’’’”’–
  332.    †’– / ’’’’œ
  333.    †’– DIV ’’œ
  334.    †’– MOD ’’œ
  335.    ›’– AND ’’“
  336. Number
  337.  
  338. ’’„’– <Integer> ’”’–
  339.   ›’– <Real> ’’’’“
  340. OctalDigit
  341.  
  342. ’’’„’– 0 ’’”’’–
  343.    †’– 1 ’’œ
  344.    †’– 2 ’’œ
  345.    †’– 3 ’’œ
  346.    †’– 4 ’’œ
  347.    †’– 5 ’’œ
  348.    †’– 6 ’’œ
  349.    ›’– 7 ’’“
  350. PointerType
  351.  
  352. ’’– POINTER ’– TO ’– <Type> ’’–
  353. ProgramModule
  354.  
  355. ’– MODULE ’– <Ident> ’„’– <Priority> ’’”– ; ’„ ”’–
  356.                     ›’’’’’’’’’’’’’’“     ‹ ‹
  357.  ”’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“ ‹
  358.  ‹  ”’ <Import> —„                           ‹
  359.  ›’’›’’’’’’’’’’“’’– <Block> ’– <Ident> ’– . ’’’“
  360. Priority
  361.  
  362. ’– [ ’– <ConstantExpression> ’– ] ’–
  363. ProcedureCall
  364.  
  365. ’– <Designator> ’„’– <ActualParameters> ’’”’’–
  366.                ›’’’’’’’’’’’’’’’’’’’’’’“
  367. ProcedureDeclaration
  368.  
  369. ’– <ProcedureHeading> ’– ; ’– <Block> ’– <Ident> ’’’–
  370. ProcedureHeading
  371.  
  372. ’– PROCEDURE ’– <Ident> ’„’– <FormalParameters> ’”’–
  373.                        ›’’’’’’’’’’’’’’’’’’’’’“
  374. ProcedureType
  375.  
  376. ’– PROCEDURE ’„’– <FormalTypeList> ’’”’’–
  377.               ›’’’’’’’’’’’’’’’’’’’’“
  378. Qualident
  379.  
  380.   ”’’’’ . —’’’„
  381.   ‹           ‹
  382. ’’›’– <Ident> ’’“’’–
  383. Real
  384.  
  385.   ”’’’’’’’’’’’„        ”’’ <Digit> —’„
  386. ’’›’– <Digit> ’’“’’– . ’’›’’’’’’’’’’’“’’„’– <ScaleFactor> ’’”’–
  387.                                       ›’’’’’’’’’’’’’’’’’“
  388. RecordType
  389.  
  390. ’– RECORD ’– <FieldListSequence> ’– END ’–
  391. Relation
  392.  
  393. ’’„’– = ’’”’’–
  394.   †’– # ’’œ
  395.   †’– \< ’’œ
  396.   †’– \<= ’œ
  397.   †’– > ’’œ
  398.   †’– >= ’œ
  399.   ›’– IN ’“
  400. RepeatStatement
  401.  
  402. ’– REPEAT ’– <StatementSequence> ’– UNTIL ’– <Expression> ’–
  403. ScaleFactor
  404.  
  405.        ”’’– + ’’„   ”’’’’’’’’’’’„
  406. ’’– E ’œ’’’’’’’’†’’’›’– <Digit> ’’“’’’–
  407.        ›’’– - ’’“
  408. Set
  409.                           ”’’’’’ , —’’’„
  410. ’„’– <Qualident> ’’”– { ’„’’›’– <Element> ’“’’”’– } ’–
  411.  ›’’’’’’’’’’’’’’’“     ›’’’’’’’’’’’’’’’’’’“
  412. SetType
  413.  
  414. ’’– SET ’– OF ’– <SimpleType> ’’–
  415. SimpleExpression
  416.  
  417.   ”’– + ’’„   ”’’ <AddOperator> —„
  418. ’’œ’’’’’’’†’’’›’’’’– <Term> ’’’’’“’’’–
  419.   ›’– - ’’“
  420. SimpleType
  421.  
  422. ’„’– <Qualident> ’’’’’”’’–
  423.  †’– <Enumeration> ’’’œ
  424.  ›’– <SubrangeType> ’’“
  425. Statement
  426.  
  427. ’„’– <Assignment> ’’’’’’’’’’’’’’’’”’’–
  428.  †’– <ProcedureCall> ’’’’’’’’’’’’’œ
  429.  †’– <IfStatement> ’’’’’’’’’’’’’’’œ
  430.  †’– <CaseStatement> ’’’’’’’’’’’’’œ
  431.  †’– <WhileStatement> ’’’’’’’’’’’’œ
  432.  †’– <RepeatStatement> ’’’’’’’’’’’œ
  433.  †’– <LoopStatement> ’’’’’’’’’’’’’œ
  434.  †’– <ForStatement> ’’’’’’’’’’’’’’œ
  435.  †’– <WithStatement> ’’’’’’’’’’’’’œ
  436.  †’– EXIT ’’’’’’’’’’’’’’’’’’’’’’œ
  437.  †’– RETURN ’„’– <Expression> ’’”’œ
  438.  ‹           ›’’’’’’’’’’’’’’’’“ ‹
  439.  ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“
  440. StatementSequence
  441.  
  442.   ”’’’’’’’ ; ’’’’’„
  443.   ‹               ‹
  444. ’’›’– <Statement> ’’“’’–
  445. String
  446.  
  447.           ”’ Character —’„
  448. ’’„’– ' ’’›’’’’’’’’’’’’’’“’’– ' ’’”’’–
  449.   ‹       ”’ Character —’„        ‹
  450.   ›’– " ’’›’’’’’’’’’’’’’’“’’– " ’’“
  451. SubrangeType
  452.  
  453. ’„’– <Qualident> ’’”– [– <ConstantExpression> –..– <ConstantExpression> –] –
  454.  ›’’’’’’’’’’’’’’’“
  455. Term
  456.  
  457.   ”’’ <MulOperator> —’„
  458. ’’›’’’’– <Factor> ’’’’“’’’–
  459. Type
  460.  
  461. ’„’– <SimpleType> ’’’’”’–
  462.  †’– <ArrayType> ’’’’’œ
  463.  †’– <RecordType> ’’’’œ
  464.  †’– <SetType> ’’’’’’’œ
  465.  †’– <PointerType> ’’’œ
  466.  ›’– <ProcedureType> ’“
  467. TypeDeclaration
  468.  
  469. ’– <Ident> ’– = ’– <Type> ’’’’–
  470. VariableDeclaration
  471.  
  472. ’– <IdentList> ’– : ’– <Type> ’’’’–
  473. Variant
  474.  
  475. ’’„’– <CaseLabelList> ’– : ’– <FieldListSequence> ’’’”’’–
  476.   ‹                                              ‹
  477.   ›’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’“WhileStatement
  478.  
  479. ’– WHILE ’– <Expression> ’– DO ’– <StatementSequence> ’– END ’–
  480. WithStatement
  481.  
  482. ’– WITH ’– <Designator> ’– DO ’– <StatementSequence> ’– END ’’–
  483.