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

Fortran IV

arsa
Beginner
2,862 Views
Hello Dr. Fortran,
is it possible to compile Fortran IV Codes via Intel Visual Fortran for Windows?
If not, do you know any Compiler to do it?

best, arsa
0 Kudos
14 Replies
jimdempseyatthecove
Honored Contributor III
2,862 Views

Arsa,

Stevemay have a better answer than mine.

Generally, if you name your source file with an extension (file type) of .F the current Intel compilers will compile the executable portions of the programs without requiring changes to the source code.

This said, you may experience platform, operating system and compilerissues that necessitate some changes in your code.

You may need to address issues related to:

a) FileOPEN relating to file specifications, modes/permissions, data conversions (BigEndian to LittleEndian)
b) Operating system calls (time and date are among the first to bite you)
c) Windows related issues

Conversion is not necessarily difficult, but for a large project itmay require the programmer to pay attention to details as they make changes to a working program.

Often is the case that when you update from Fortran IV to Fortran 95 (or 2003, 200n) that there is a change in operating system as well as a change in language features and capabilities (e.g. allocatable variables). I would caution that your first effort be to port the Fortran IV program to Fortran 95 making only the necessary changes to get it working on the new platform and with the newest compiler. Save that version as your base level working copy of the code (call it version 0.0.1). From there test the program to verify the results are correct as there may be some changes such as equivalences in common blocks, data initialization, and other subtleties that need to be worked out. Only after you are satisfied that the base level port is successful, then start adding feature and design changes.

I haven't used Fortran IV since my PDP-8 days back in the early 1970's

Wishing your conversion goes well.

Jim Dempsey

0 Kudos
TimP
Honored Contributor III
2,862 Views

Fortran IV means various things to various people. Usually, it means Fortran 66 with a few vendor-dependent extensions; sometimes it means anything which was accepted by some particular non-standard compiler. Nearly all of f66 remains standard and will work with any Fortran compiler. Most of the more common extensions also still work.

As Jim hinted, there were no standard facilities prior to f77 for OPEN, f90 for time and date, and many other necessary things, forcing some use of vendor extensions. It was common also to depend unnecessarily on non-standard behaviors of particular compilers, such as one-trip minimum DO loops. f66 allowed "extended-range" (jumping out of a loop and back in), and few compilers were able to distinguish between correct and incorrect usage. Current compilers would require you to correct those. It seems unlikely that Fortran IV code could contain Windows dependencies, unless it contains subsequent modifications.

ifort has had a few options to support pre-standard "legacy" use and mis-use of Fortran, such as /Qsave /Qzero

You are welcome to ask questions about specific problems which may come up.

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,861 Views

Thanks tim18

Sorry for the confusion, I did not mean to say the Fortran IV program has Windows dependencies, instead I intended to say that the program may require Windows dependencies during the conversion (or at least require convesion from vendor/os specific programming practices to now generally accepted common programming practices).

Most conversions go without problem. But there are situations that are difficult to diagnose. Missing, extra or variable number of arguments to function/subroutine is a common problem area but there are many more not so common that can cause not so apparent problems. Onesuch is a subroutine modifying a literal passed on the call. WhileIVF has an option switch to correct for this, the user may waste days in tracking down this problem. The project manager should expect some unexpected problems (and time) in the conversion effort.

Jim Dempsey

0 Kudos
Steven_L_Intel1
Employee
2,861 Views
Intel Visual Fortran fully supports FORTRAN IV programs, but in some cases you may need to add the "Enable Fortran 66 semantics" option. It is unlikely that you'll need to do so, unless your code depends on DO loops executing at least once (the F66 standard did not specify that, but most F66 compilers behaved that way), or use the EXTERNAL* statement.

As others have commented, most people, when they ask about FORTRAN IV, really mean fixed-form source, which of course is also supported.
0 Kudos
arsa
Beginner
2,861 Views

thank you all for your Information and sorry for my late entry.

i cancompile all Files now excluded one with19 similar error:

If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element.

it points at call hpout(x,y,1,1) which i couldnt understand.

Any Idea?

chears arsa

0 Kudos
TimP
Honored Contributor III
2,861 Views
This practice always was a violation of Fortran, and didn't work with the "Fortran IV" I used back then, although it may have worked with one of the most popular "Fortran IV" compiler. The compiler says you have passed an argument which is not an array to a subroutine which expects an array. It could be fixed by changing the argument in the call to an array of length 1.
0 Kudos
Steven_L_Intel1
Employee
2,861 Views
For example, if x is the scalar in question, you can pass instead. Note that you will not be able to assign to that argument in the subroutine.

Our compilers started detecting this error about eight years ago.
0 Kudos
arsa
Beginner
2,861 Views
Steve,

thank you for your advice, i face know another Error:

fatal error LNK1101: False Version MSPDB80.DLL; Ckeck installation these products. LINK

i am using Visual Studio 2005 with VFC.



0 Kudos
arsa
Beginner
2,861 Views
VS Professional Edition -German Version
0 Kudos
Steven_L_Intel1
Employee
2,861 Views
Please install Service Pack 1 for Visual Studio 2005.
0 Kudos
arsa
Beginner
2,861 Views
okay, i installed SP1, but i become the same error again!
other idea?

greeting, arsa
0 Kudos
Steven_L_Intel1
Employee
2,861 Views
Search your system for all occurrences of MSPDB80.DLL. It should be in these folders only

Program FilesMicrosoft Visual Studio 8Common7IDE
Program FilesMicrosoft Visual Studio 8vc/binamd64 (you may not have this one)

If you find it in any other folders, rename that copy to MSPDB80.DLLBAD. The version in the IDE folder ought to have a version number of 8.0.50727.762. Right click on the DLL, select Properties, Version.
0 Kudos
arsa
Beginner
2,861 Views
Normal 0 21 false false false MicrosoftInternetExplorer4 Thanks for your professional help. That problem is solved nowsmiley [:-)]

My Project is a Console App, only in Fortran IV.

What do you mean about these errors?

LNK2005: _main already defined in LAUF.obj

Fatal error LNK1169: one or more multiply defined symbols found Console1.exe

arsa

0 Kudos
Les_Neilson
Valued Contributor II
2,861 Views

You have two (or more) filestrying to be the main program.

Les

0 Kudos
Reply