Ada 2012 introduced the following syntax:
z:=(if b then 5 else 42);
Note that the if-expression (that's what it is called) has to be parenthesized. This solves precedence problem.
This is also legal:
f:=float(if b then x else y);
which is equivalent to
f:=(if b then float(x) else float(y));
When the parentheses are required anyways, no need for additional ones:
func(if x then a else b);
I think Free Pascal could simply copy Ada syntax.
The rationale can be found
here.