- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I remember this from the DVF forum. https://software.intel.com/en-us/forums/archived-visual-fortran-read-only/topic/313180 So it was deleted somewhere between DVF 6.1 and DVF 6.5. It's BASIC syntax, isn't it? https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/comparison-operators
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are going to have to grin and bear it. Fortunately VS can perform entire Solution Find and Replace (with query).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've never seen "<>" used for ".NE." or "/=" was that legal in CVF and if so what flavour of Fortran did it come from?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a vague memory that <> crept in to CVF unintentionally and we removed it when we found it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Those logical operators are very sneaky.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I remember this from the DVF forum. https://software.intel.com/en-us/forums/archived-visual-fortran-read-only/topic/313180 So it was deleted somewhere between DVF 6.1 and DVF 6.5. It's BASIC syntax, isn't it? https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/comparison-operators
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it's BASIC syntax. We decided that we didn't want to support it so took it out.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page