#INCLUDE "consts.inc"

--{{{  COMMENT documentation
--
--This process contains many syntactic errors.	Once you have corrected
--those and made it compile, you have to fix the semantic errors to get
--it to work without crashing.	What is supposed to happen is that the
--process echoes capital letters once, lower case letters three times
--and digits five times ...
--
--}}}

PROC bugs (CHAN OF BYTE keyboard, screen, error)
  WHILE FALSE
   INT ch
     keyboard ? ch
     IF ('A' <= ch) AND (ch <= 'Z')
        SEQ
	  scr ! ch              -- echo ch once
	  scr ! FLUSH           -- and force it out
      ('a' <= ch) AND (ch <= 'z')
        SEQ
          scr ! ch              -- echo ch three times
          scr ! ch
          scr ! ch
	  scr ! FLUSH           -- and force it out
      ('0' <= ch) AND (ch <= '9')
        PAR
          scr ! ch              -- echo ch five times
          scr ! ch
          scr ! ch
          scr ! ch
          scr ! ch
	  scr ! FLUSH           -- and force it out
:
