056. Standards committee has approved conditional expressions#
topic: Conditionals
Note
This tip is a draft1.
@arclight The standards committee has approved conditional expressions, with
y = ( i>=1 .And. i<=Size(a) ? a(i) : -Huge(y) )
equivalent to
if (i>=1 .And. i<=Size(a)) then y = a(i) else y = -Huge(y) end if
The standards committee has approved conditional expressions, with
— FortranTip (@fortrantip) December 28, 2021
y = ( i>=1 .And. i<=Size(a) ? a(i) : -Huge(y) )
equivalent to
if (i>=1 .And. i<=Size(a)) then
y = a(i)
else
y = -Huge(y)
end ifhttps://t.co/NKcB9wR2kU
- 1
From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.