[fpc-devel] Fwd: While - Otherwise Statement

Dmitry Boyarintsev skalogryz.lists at gmail.com
Mon Oct 12 17:17:07 CEST 2015


On Mon, Oct 12, 2015 at 2:07 AM, Sven Barth <pascaldragon at googlemail.com>
wrote:

> It's from Extended ISO Pascal and I don't know for how long it exists in
> FPC already, but it does so definitely for some time.
>
Thanks! I've never thought to go and read the FP documentation on "case
statement", assuming it works in turbo pascal/delphi compatible way.

About while-then. While the syntax is unlikely to break anything, it's
inconsistent with if-statement.
where, if-then is executed when condition is true.
For while-then is executed then condition is false.
Thus, while-else or while-otherwise are better. However, both syntax would
cause code incompatibility.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20151012/60fa1322/attachment.html>


More information about the fpc-devel mailing list