[Oberon] ThisCommand, semi missing

Jan Verhoeven jan at verhoeven272.nl
Tue Apr 15 01:33:05 CEST 2014


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?


-- 
Groetjes

Jan Verhoeven




More information about the Oberon mailing list