[Oberon] CASE statement error

Necati Ecevit fnecati at gyte.edu.tr
Mon Nov 7 13:10:47 CET 2005


Hi,

The following code gives the error: "case range too large" in Oberon and
traps in Bluebottle/Aos with PC0.Compile.

PROCEDURE TestCase;
VAR x: INTEGER;
BEGIN
  x:=500; 
 CASE x OF
      1   : 
  | 100   : 
  | 514   :  (* err:209 case range too large *)
  | -413  :  (* err:209 case range too large *) 
 ELSE
 END;
 
END TestCase;

According to OberonReport.html case labels must be integer or char type.
When they are integer, min/max value of a label should be min/max of
integer type.

This error does not occur in Component Pascal (Blackbox/ Oberon) and
OO2C.

Is this a bug ?

- Necati.




More information about the Oberon mailing list