mitch grunes
Programmer
(I already tried posting to the old Fortran Usenet group - didn't realize nobody reads it anymore. I guess this is the active Fortran forum - right? I hope it isn't too technical a question.)
How universal are these modern Fortran Features?
1. I'm updating my Fortran code that processes other Fortran code, such as my code diagrammer. I'm about to give up keeping it in card format, along with old Fortran compilability. I want to use free format and some modern features, and for it to be able to process more (almost all?) modern Fortran features.
2. I'd like it to compile on GNU (gfortran), Microsoft, Intel, Apple, NVidia, AMD, ATI, Sun, SGI and DEC Fortrans; maybe on cross-compilers for Android (ARM and Intel CPUs) and IOS; and anything else that is common. (What else is commonly out there?) Unfortunately, I only have PCs, running Windows and Linux, running only gfortran, so I can't test the features I'd like to use on all of them.
3. So, how universal among these compilers are:
A. COMMAND_ARGUMENT_COUNT
B. GET_COMMAND_ARGUMENT
Or would I need a C-language stub to handle the command line?
4. How universally supported among these compilers is module ISO_FORTRAN_ENV, including stdin, stdout, and stderr. Also how universal on the indicated platforms is stdin=5, stdout=6 stderr=0?
5. The draft standard section 3.3.2.1 ( limits line length to 132 characters, including free format. If comment lines extend past 132, do the indicated common compilers ignore it, emit an error, or does that vary? Do some modern Fortrans allow non-comments to extend past 132 too?
6. Are VAX and Sun systems still common?
6.5 At one point, VAX file format limited line length to 127 characters - is that still true, and if not, do OPEN, READ or WRITE statements need a special form to handle it?
7. Section 4.4.4.3 of the draft standard says that all non-control characters can appear in free format character constants. But do some of the common compilers have problems with special characters like
| & # @ ! % ~ < > [ ] { } :
inside quotes ('' or ""), even in free format? (On [old] SGI compilers, you had to explicitly disable the pre-processor - or maybe that only for card format?)
8. Is OPEN clause ENCODING='UTF8' supported on all common modern Fortrans?
9. The draft standard allows optional spaces in some keywords:
10. Is there a Modern Fortran interpreter, preferably free? (Yes, I know that's silly from some perspectives. Nonetheless...)
11. Of course All trademarks mentioned above are the property of their respective owners, possibly including GNU, gfortran, Microsoft, Intel, Apple, NVidia, AMD, ATI, Sun, SGI and DEC, Android, ARM, IOS, and any that I have accidentally omitted.
Thanks for your time!
P.S. Would posting a link to my diagramming code be a violation of posting guidelines?
How universal are these modern Fortran Features?
1. I'm updating my Fortran code that processes other Fortran code, such as my code diagrammer. I'm about to give up keeping it in card format, along with old Fortran compilability. I want to use free format and some modern features, and for it to be able to process more (almost all?) modern Fortran features.
2. I'd like it to compile on GNU (gfortran), Microsoft, Intel, Apple, NVidia, AMD, ATI, Sun, SGI and DEC Fortrans; maybe on cross-compilers for Android (ARM and Intel CPUs) and IOS; and anything else that is common. (What else is commonly out there?) Unfortunately, I only have PCs, running Windows and Linux, running only gfortran, so I can't test the features I'd like to use on all of them.
3. So, how universal among these compilers are:
A. COMMAND_ARGUMENT_COUNT
B. GET_COMMAND_ARGUMENT
Or would I need a C-language stub to handle the command line?
4. How universally supported among these compilers is module ISO_FORTRAN_ENV, including stdin, stdout, and stderr. Also how universal on the indicated platforms is stdin=5, stdout=6 stderr=0?
5. The draft standard section 3.3.2.1 ( limits line length to 132 characters, including free format. If comment lines extend past 132, do the indicated common compilers ignore it, emit an error, or does that vary? Do some modern Fortrans allow non-comments to extend past 132 too?
6. Are VAX and Sun systems still common?
6.5 At one point, VAX file format limited line length to 127 characters - is that still true, and if not, do OPEN, READ or WRITE statements need a special form to handle it?
7. Section 4.4.4.3 of the draft standard says that all non-control characters can appear in free format character constants. But do some of the common compilers have problems with special characters like
| & # @ ! % ~ < > [ ] { } :
inside quotes ('' or ""), even in free format? (On [old] SGI compilers, you had to explicitly disable the pre-processor - or maybe that only for card format?)
8. Is OPEN clause ENCODING='UTF8' supported on all common modern Fortrans?
9. The draft standard allows optional spaces in some keywords:
Table 3.2: Adjacent keywords where separating blanks are optional
BLOCK DATA
END ENUM
END SELECT
DOUBLE PRECISION
END FILE
END SUBMODULE
ELSE IF
END FORALL
END SUBROUTINE
ELSE WHERE
END FUNCTION
END TYPE
END ASSOCIATE
END IF
END WHERE
END BLOCK
END INTERFACE
GO TO
END BLOCK DATA
END MODULE
IN OUT
END CRITICAL
END PROCEDURE
SELECT CASE
END DO
END PROGRAM
SELECT TYPE
Last I checked, GNU gfortran does not support "dowhile" in free format. Are there any other cases where common modern Fortran compilers require the optional space be present or not present?BLOCK DATA
END ENUM
END SELECT
DOUBLE PRECISION
END FILE
END SUBMODULE
ELSE IF
END FORALL
END SUBROUTINE
ELSE WHERE
END FUNCTION
END TYPE
END ASSOCIATE
END IF
END WHERE
END BLOCK
END INTERFACE
GO TO
END BLOCK DATA
END MODULE
IN OUT
END CRITICAL
END PROCEDURE
SELECT CASE
END DO
END PROGRAM
SELECT TYPE
10. Is there a Modern Fortran interpreter, preferably free? (Yes, I know that's silly from some perspectives. Nonetheless...)
11. Of course All trademarks mentioned above are the property of their respective owners, possibly including GNU, gfortran, Microsoft, Intel, Apple, NVidia, AMD, ATI, Sun, SGI and DEC, Android, ARM, IOS, and any that I have accidentally omitted.
Thanks for your time!
P.S. Would posting a link to my diagramming code be a violation of posting guidelines?