[Oberon] ThisCommand, semi missing
volkert at nivoba.de
volkert at nivoba.de
Tue Apr 15 06:42:30 CEST 2014
as described in the syntax definition.
ProcedureBody = DeclarationSequence ["BEGIN" StatementSequence]
["RETURN" expression] "END".
StatementSequence = statement {";" statement}.
Am 15.04.2014 01:33, schrieb Jan Verhoeven:
> While going through Modules.Mod.txt I encountered the procedure ThisCommand.
>
>
> PROCEDURE ThisCommand* <param list>
>
> VAR <declaration>
>
> BEGIN
> res := 5;
> w := 0;
> IF mod # NIL THEN
> adr := mod.cmd;
> SYSTEM.GET (adr, ch);
> WHILE (ch # 0X) & (res # 0) DO
> k := 0; (* read command name *)
> REPEAT
> s [k] := ch;
> INC (k);
> INC (adr);
> SYSTEM.GET (adr, ch)
> UNTIL ch = 0X;
> s[k] := 0X;
> REPEAT INC (adr) UNTIL adr MOD 4 = 0;
> SYSTEM.GET (adr, k);
> INC (adr, 4);
> IF s = name THEN
> res := 0;
> w := mod.code + k
> ELSE
> SYSTEM.GET (adr, ch)
> END
> END
> END
> RETURN SYSTEM.VAL (Command, w)
> END ThisCommand;
>
>
> I would have expected a semicolon before "RETURN SYSTEM.VAL (Command, w)"
>
> Is this a bug, or a feature?
>
>
More information about the Oberon
mailing list