'CASE' bug!_(re)

Mon, 6 Oct 1997 02:20:17 +0200 (MEST)


According to Bernhard Tschirren:
> 
> Hmm, it seems that GPC (971001-DJGPP) is plagued by TurboPascal's famous
> 'CASE' bug. Have a go at compiling the sample program below:
> 
> 
> Var
>     I : Integer;
> Begin
>     Case I Of
>         1:   WriteLn('One');
>         2:   WriteLn('Two');
>         Else WriteLn('Big');
> 
>         WriteLn('BUG!');
>     End;
> End.

Yes, it writes "Big BUG!" to the screen - at least if I assign a
value not in [ 1, 2 ] to I.  What's wrong about that?

    Peter

 Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
 maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [970125]


Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es