[fpc-devel] Fwd: While - Otherwise Statement

Max Nazhalov stein_nospam at mail.ru
Mon Oct 12 17:52:56 CEST 2015

On 12.10.2015 17:17 schrieb "Dmitry Boyarintsev" <skalogryz.lists at gmail.com> wrote:
> 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.

I doubt "while-else" is a variant, due to dangling "else".

How will be compiled, e.g.
if something then
  while not_done_yet do
else // obviously valid, and expected to be a part of "if-then-else"

WBR, Max.

More information about the fpc-devel mailing list