[fpc-devel] new features and facilities

Ralf Quint freedos.la at gmail.com
Thu Oct 8 19:39:30 CEST 2015


On 10/8/2015 10:35 AM, Mark Morgan Lloyd wrote:
>
>> Indeed, it is even more succinct in C/C++:
>>
>>    x = <boolean> ? <then part> : <else part>;
>
> At which point you'll have various members of the Pascal community 
> decrying it as too C-like.

Well, the tenary operator as present in C(++) is a shortcut for a simple 
if-then-else, and can be pretty readable if used "in moderation". And it 
assigns a  value to x depending on two expressions not some murky 
boolean result out of three expressions like Bart supposed...

Ralf


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus




More information about the fpc-devel mailing list