Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Error on expression

Tamiris_Crepalde
Beginner
128 Views

Hi, I'm got a code on internet that make otimization but my compiler is setting the following fragment with a error. Someone know how can I fix it? 

Sorry for my english.

 

      do i=1,nlin
          if (barra_f(i) .gt. barra_i(i)) then
              A(nger+1+cont1,nger+barra_i(i)+1) = lineX(barra_i(i), barra_f(i))
              A(nger+1+cont1,nger+barra_f(i)+1) = -lineX(barra_i(i), barra_f(i))
          else
              A(nger+1+cont1,nger+barra_i(i)+1) = -lineX(barra_i(i), barra_f(i))
              A(nger+1+cont1,nger+barra_f(i)+1) = lineX(barra_i(i), barra_f(i))
          end if
          A(nger+1+cont1,1) = carregamento(i)
          cont1=cont1+1
      end do

 

The compiler sets the expessions with the following error
Erro error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: = .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ... C:\Users\Tamiris\Documents\Visual Studio 2017\Projects\FPO\Console4\Simplex.for 123
0 Kudos
3 Replies
Arjen_Markus
Valued Contributor III
128 Views

Which line is the offending line? The error message indicates line 123, but there is no such line of course in the above fragment.

And without declarations it is a trifle difficult to diagnose errors that might come from a wrong use/declaration.

 

JVanB
Valued Contributor II
128 Views

The compiler thinks the source code is fixed format, so it's ignoring characters after the first 72. One of your lines is 74 characters long.

Either change the name of the file to Simplex.f90 or compile it with the /FREE compiler switch in effect. Either choice will let the compiler know it's free format.

 

jimdempseyatthecove
Black Belt
128 Views

or change the indentation such that your source lines do not extend past column 72 (and do not use tab characters).

If you are using MS Visual Studio, columns 73 and later are highlighted with the comment color (usually green).

Jim Dempsey

Reply