# Re: fortran equivalent to C

*From*: Larry Gates <larry@xxxxxxxxxxxxxxx>*Date*: Sun, 25 Jan 2009 18:36:11 -0700

On Sun, 25 Jan 2009 20:59:47 +0000, none wrote:

I think the simplest way is to replace

x ? a : b

with

IF (x .n.e 0) THEN

a

ELSE

b

END IF

and y = x ? a : b with

IF (x .ne. 0) THEN

y = a

ELSE

y = b

END IF

This gets you your guarantee that a is only evaluted if X != 0, and b only

if x = 0.

It is not simple to automate.

Curious what you mean by the last sentence.

--

larry gates

I don't know if it's what you want, but it's what you get. :-)

-- Larry Wall in <10502@xxxxxxxxxxxxxxxxxxxxxxx>

.

**Follow-Ups**:**Re: fortran equivalent to C***From:*none

**References**:**fortran equivalent to C***From:*Larry Gates

**Re: fortran equivalent to C***From:*e p chandler

**Re: fortran equivalent to C***From:*none

- Prev by Date:
**Re: fortran equivalent to C** - Next by Date:
**Re: inputting the ephemerides** - Previous by thread:
**Re: fortran equivalent to C** - Next by thread:
**Re: fortran equivalent to C** - Index(es):