On Mon, 6 Oct 1997 00:27:19 +0200, Frank Heckenbach wrote:
>
>Bernhard Tschirren wrote:
[...]
>> Var
>> I : Integer;
>> Begin
>> Case I Of
>> 1: WriteLn('One');
>> 2: WriteLn('Two');
>> Else WriteLn('Big');
>>
>> WriteLn('BUG!');
>> End;
>> End.
>
> SP and EP (AFAIK) don't use "else" but
>"otherwise" in a "case" statement, so they don't apply here.
Actually SP doesn't have an else/otherwise/default/whatever you want to
call it technique for case statements. EP does have an 'otherwise'
feature and my reading of 10206:6.9.3.5 is that like BP's "else" usage,
"otherwise" doesn't require a begin/end for statement sequences either.
Or can someone tell if I am reading it wrong? (Note especially, the
first example)
>(If GPC behaves wrong with "otherwise", that's another thing, I don't know.)
Ironically, gpc doesn't compile it with an "otherwise" in there (at
least with 970714) -- which *would* be a bug (IMO), but I don't think
that is at all what the original poster was getting at.
-Kevin
--
Kevin A. Foss --- kfoss(a)mint.net
--