[fpc-devel] Fwd: While - Otherwise Statement

Sven Barth pascaldragon at googlemail.com
Sun Oct 11 22:48:07 CEST 2015

Am 11.10.2015 18:34 schrieb "Martin Frb" <lazarus at mfriebe.de>:
> On 11/10/2015 16:14, Sven Barth wrote:
>> Am 11.10.2015 15:56 schrieb "MohsenTi" <mohsen.timar at gmail.com>:
>> >
>> > Hi everybody
>> >
>> > I add new feature to FPC compiler to simplify programming.
>> > this is While - Otherwise working like While - Else in python and has
backwards compatibility.
>> Nice idea with the otherwise. I first thought that this would break
case-statements that use otherwise instead of else, but then I remembered
that the case-label-blocks can and IMHO should be terminated by ; anyway.
At least problems can be easily circumvented.
> "should", but they do not have to, at least not the last one before the

I know and that's something I'm probably going to be wondering about for
all eternity -.-

> why not a new keyword?

I'm not a fan of adding new keywords for something like this...

> while bool do
>   foo()
> afterwards [do]  // or even "then" would make sense (from english reading
>   bar();

That "then" is a great idea! That would definitely not break anything and
it would make sense indeed:

=== code begin ===

while bool do

until bool then

=== code end ===

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20151011/6e37385a/attachment.html>

More information about the fpc-devel mailing list