Page 1 of 1

Generic IIF

Posted: Thu Aug 12, 2010 1:53 am
by LukasT
Hello,
why is not IIF function generic? That is problem, because I can't use this for automatic conversion of our old expressions because of need of type casting...
Thank you...

Generic IIF

Posted: Fri Aug 13, 2010 2:22 am
by Jan
Hello Lukas,

Can you explain this problem in more details?

Thank you.

Generic IIF

Posted: Fri Aug 13, 2010 2:47 am
by LukasT
Hello Jan,
your function IIF has object params and return type object, but we need this generic... it means, if we put string params, function has to return string value, not only object...
For example: 1.1 == IIF(1==1, 1.0, 2.1) will return exception, that operator '==' cannot be applied to operands of type 'double' and 'object'...
Yes, solution is to do casting, but that is not elegant and not friendly for automatic generation of expresions, is it?

Generic IIF

Posted: Fri Aug 13, 2010 6:26 am
by Alex K.
Hello,

We added overloads for the IIF function for the same types for friendly automatic generation of expressions.
Please check the latest build when it will be available.

Thank you.

Generic IIF

Posted: Fri Aug 13, 2010 6:47 am
by LukasT
Hello Aleksey,
great job! I am looking forward to the next build ;-)
Thank you and have a nice day ;-)

Generic IIF

Posted: Fri Aug 13, 2010 7:03 am
by Alex K.
Ok! Have a nice day too!!!