Am 12.10.2015 17:17 schrieb "Dmitry Boyarintsev" <[email protected]
>:
> 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.

It's less about consistency with if-then, but more about consistency from a
human language point of view.

"while true do this then that" reads more or less as well as "while true do
this otherwise that" (though both carry a slightly different meaning) with
the added benefit of the former not to break any existing code (as you had
written yourself).

Regards,
Sven
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to