Good day,(adsbygoogle = window.adsbygoogle || []).push({});

I'm working with a FORTRAN program that has the line:

EDEN=EDEN+(STVS**2)/(N(J)-1)

I would like to check if N(J)-1 is equal to zero. If so make N(J)-1=1.0

The following doesn't work:

IF ((N(J)-1).EQ.0.0) THEN

N(J)-1=1.0

END IF

I'm using gfortran and am getting unclassified statement at 1. The 1 is pointing to the beginning of the line N(J)-1=1.0

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fortran Arithmetic Issue in FORTRAN

**Physics Forums | Science Articles, Homework Help, Discussion**