[fpc-devel] new features and facilities
Sven Barth
pascaldragon at googlemail.com
Sat Oct 10 11:19:48 CEST 2015
Am 10.10.2015 10:51 schrieb "Mark Morgan Lloyd" <
markMLl.fpc-devel at telemetry.co.uk>:
>
> Michael Van Canneyt wrote:
>>
>> On Fri, 9 Oct 2015, Sven Barth wrote:
>>
>>
>>>>
>>>> I'm not sure this kind of semantics is possible with a compiler
>>>
>>> intrinsic...
>>>>
>>>> But if it is: In that case the IfThen or IIF() or somesuch has my
>>>
>>> absolute top preference, followed by ternary. (and the If .. then
>>> expression should be blasted to hell ;) )
>>>
>>> Yes a compiler intrinsic could handle that. In the end all three
syntaxes
>>> are the same code representation anyway: namely an if-node.
>>> The IfThen() intrinsic would be fine with me as well. Let's call this
our
>>> common ground ;)
>>
>>
>>
>> Agreed !
>
>
> It would be even better if it could be generalised to evaluate and return
one of any number of expressions.
How do you think that could look like? IfThen() is the wrong intrinsic for
this and for a CaseOf() intrinsic you'd nevertheless need the case labels.
And /then/ I agree with Ralf that it isn't understandable...
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20151010/8d87174a/attachment.html>
More information about the fpc-devel
mailing list