[fpc-devel] Fwd: While - Otherwise Statement

Max Nazhalov stein_nospam at mail.ru
Mon Oct 12 21:01:52 CEST 2015


>> I can't think of a use case either. And just because another language
>> provides such a solution, does not imply that FPC should. As to achieving
>> the functionality in FPC:
>>
>> if cond then
>>    while cond do
>>      foo
>> else
>>    bar;
>
>That's what I've thought about from the beginning of this discussion..

The only drawback is that "cond" is calculated twice instead of once
before the actual loop body -- not all will be happy.. ;-)

-- 
WBR, Max.




More information about the fpc-devel mailing list