24 Jan
2022
24 Jan
'22
2:14 p.m.
I'm working through the book "Into the Realm of Oberon" which is written for Oberon-2. I can't figure out how to translate the following program into Oberon-07 (I'm using the OBNC compiler): MODULE case; IMPORT In,Out; VAR countVowels: INTEGER; ch: CHAR; BEGIN In.Open; countVowels:=0; LOOP In.Char(ch); IF ~In.Done THEN EXIT END; CASE ch OF "a", "e", "i", "o", "u", "A", "E","I","O","U": INC(countVowels) ELSE END; END; Out.Int(countVowels,0); Out.String(" vowels read.");Out.Ln; END case. Oberon-07 doesn't allow LOOP, EXIT, or ELSE in CASE. Thanks in advance for any help. -- Sent with https://mailfence.com Secure and private email