News for hackers. Stuff that matters.
Re:Fortran adds conditional expressions by Bostonian on Thursday July 01, 2021 @02:43PM (#27702823)
The ternary is new. Before, one could use the merge intrinsic function to write

    y = merge(a(i), -Huge(y), i>=1 .And. i<=Size(a))
but this is risky, because merge does not short-circuit, and the program could crash if i < 1. The ternary syntax

    y = (boolean ? expression_1 : expression_2)
only evaluates one of the expressions.

There are no comments on this comment yet.