Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner

Cannot regconize operator when migration from Compaq visual Fortran 6.1 (CVF) to Intel Visual Fortran (IVF)

Jump to solution

I am newbie in Fortran. I have to convert  fortran src code from Compaq visual fortran 6.0 to Intel visual fortran 2018. 

I follow step by step in https://software.intel.com/en-us/articles/migrating-from-compaq-visual-fortran but when build, the error about the compiler does not regconize the operator "<>" (NEG) is displayed. When I change all the error point from <> to /=, it build success but the whole library is quite huge and I thought, maybe have some kind of option will make me don't have to change line by line. Anyone have any idea  about the root cause of this error, please let me know.

P/S: all the source code extension are .for and .f

Thank in advances

0 Kudos

Accepted Solutions
Highlighted
Valued Contributor II

I remember this from the DVF

Jump to solution
0 Kudos
8 Replies
Highlighted

You are going to have to grin

Jump to solution

You are going to have to grin and bear it. Fortunately VS can perform entire Solution Find and Replace (with query).

Jim Dempsey

0 Kudos
Highlighted
Valued Contributor II

I've never seen "<>" used for

Jump to solution

I've never seen "<>" used for ".NE." or "/=" was that legal in CVF and if so what flavour of Fortran did it come from?

0 Kudos
Highlighted
Black Belt

I don't have CVF 6.0, and you

Jump to solution

I don't have CVF 6.0, and you have not shown the exact usage of '<>', but the CVF6.6C compiler does not accept the following program.

program tst
integer i,j
i=3; j=4
if(i <> j)print 'Not equal'
end program

The compile time error is:

Compaq Visual Fortran Optimizing Compiler Version 6.6 (Update C)
Copyright 2003 Compaq Computer Corp. All rights reserved.

landg.f90
landg.f90(4) : Error: Syntax error, found '>' when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
if(i <> j)print 'Not equal'

If you cannot get your program source editor to do the replacement of '<>' by '/=', the following SED command (in Unix/Linux/Windows-Cygwin/Windows Bash) will do the conversion:

sed -e "/<>/s//\/=/g" landg.f90 > newLandG.f90

 

0 Kudos
Highlighted
Black Belt

I have a vague memory that <>

Jump to solution

I have a vague memory that <> crept in to CVF unintentionally and we removed it when we found it.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor II

Those logical operators are

Jump to solution

Those logical operators are very sneaky.

0 Kudos
Highlighted
Beginner

Quote:andrew_4619 wrote:

Jump to solution

andrew_4619 wrote:

I've never seen "<>" used for ".NE." or "/=" was that legal in CVF and if so what flavour of Fortran did it come from?

The source come from my customer made from at least 20 years ago . It kind of curious when I saw something new and I don't even know what the cause of problem. I will take a look back everything tomorrow.

Thank you all you guys for quick reply :)

0 Kudos
Highlighted
Valued Contributor II
1 View

I remember this from the DVF

Jump to solution
0 Kudos
Highlighted
Black Belt

Yes, it's BASIC syntax. We

Jump to solution

Yes, it's BASIC syntax. We decided that we didn't want to support it so took it out.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos