Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Consecutive arithmetic operators

sabalan
New Contributor I
363 Views
This isjust to share for me a new experience.
I got wrong calculation result from a numeric-intensivelegacy codeand many attempts to find the reason failed. At last I found that a minus sign at the end of a code line was repeated at the beginning of the continuation line. I really didn't know that this was legal in CVF and VAX-VMS. MS Fortran 5.1 would give a compile error "F2570 Consecutive arithmetic operators illegal", if one had something like this:
A = B + C - - D
or
A = B + C -
& - D
But I have learnt know that there are unary and binary plus and minus operators in CVF and you can make a messof these two something like the following line without any problem:
A = B + C -----++------++------ D
Good to know!
Sabalan.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
363 Views
This is explained in the Language Reference manual and should be flagged if you compile with standards checking enabled.
0 Kudos
Reply