On Tue, Jan 26, 2010 at 07:42, Graeme Geldenhuys
<graemeg.li...@gmail.com> wrote:
> David W Noon wrote:
>
> Example where 'do_3 is part of the case statement:
>  case p of
>    '1': do_1;
>    '2' if (q > 0) then do_2;
>    else do_3;
>  end;
>
> Example where 'do_3' is part of the '2' if/else statement:
>  case p of
>    '1': do_1;
>    '2' if (q > 0) then do_2
>        else do_3;
>  end;
>
>
> Syntax and understanding is as clear as rain.

Not really, the difference is not so obvious. Maybe there should be
warning for situations like this in all Pascal modes? To get rid of
it, on would have to wrap if statement with begin/end or add another
case-branch before case-else which is not single if statement? Or just
ignore the warning...
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to