- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i have a workspace in visual fortran and when i try to compile some specific fortran subroutines i get the same message.
--------------------Configuration: KNplus - Win32 Debug--------------------
Compiling Fortran...
C:\Dokumente und Einstellungen\VM\Desktop\ISO10300_2014_F_YJ_YA_B2.for
f90: Error: Illegal character in statement label field [ÿ]
f90: Error: Illegal character in statement label field [þ]
f90: Error: Illegal character in statement label field
C:\Dokumente und Einstellungen\VM\Desktop\ISO10300_2014_F_YJ_YA_B2.for(80) : Error: Syntax error, found END-OF-FILE when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM TYPE COMPLEX BYTE CHARACTER ...
.
^
Error executing df.exe.
ISO10300_2014_F_YJ_YA_B2.obj - 4 error(s), 0 warning(s)
it appears like the compiler recognizes the code as fortran 90 and not fortran 77.
here i have the code itself.
C Neutrale FORTRAN 77 Version mit FORTRAN 90/95 Erweiterungen
C
C ------------------------------------------------------------------
SUBROUTINE ISO10300_2014_F_YJ_YA_B2(
C EINGABE:
&
C AUSGABE:
& YA, IERR, RET)
C CALCULATION OF THE ROOT ADJUSTMENT FACTOR
C
C ------------------------------------------------------------------
C Erstellung / letzte Aenderung:
C -----------
C Version: KNPLUS 3.0
C Autor: KOUTSANTONIS
C Datum: 25.01.2016
C
C ------------------------------------------------------------------
C Uebergabeparameterliste:
C ------------------------
C (Name) (Typ) (Dim) (I/O) (Beschreibung)
C
C ------------------------------------------------------------------
C Verwendete Commonbloecke im Programmteil:
C -----------------------------------------
C (Name) (Beschreibung)
C
C ------------------------------------------------------------------
C Aufrufende Programmteile:
C -------------------------
C (Name) (Beschreibung)
C
C ------------------------------------------------------------------
C Aufgerufene Programmroutinen:
C -----------------------------
C (Name) (Typ) (Beschreibung)
C
C ------------------------------------------------------------------
C Verwendete Variablen im Programmteil:
C -------------------------------------
C (Name) (Typ) (Dim) (Art) (Beschreibung)
C
C ------------------------------------------------------------------
C Kategorie dieser Funktion:
C --------------------------
C @MATH::INTEGRAL::ETC@
C ------------------------------------------------------------------
C Variablenvereinbarung
C ------------------------------------------------------------------
C
IMPLICIT NONE
C
REAL YA
C STEUERGROESSEN
INTEGER IERR, RET
C
C ------------------------------------------------------------------
C Einlesen der COMMON-Bloecke ueber INCLUDE-Dateien
C ------------------------------------------------------------------
INCLUDE 'dbgon.cmm'
C ------------------------------------------------------------------
C Start aktiver Programmteil
C ------------------------------------------------------------------
CALL DBGF( DBGT, 'ISO10300_2014_F_YJ_YA_B2')
YA = 1.075
CALL DBGR( DBGT, 'YA', YA )
C ------------------------------------------------------------------
C Ruecksprung zum Rufprogramm und Ende
C ------------------------------------------------------------------
9999 CONTINUE
CALL DBGRET( DBGT, IERR )
IF (IERR .NE. 0) THEN
CALL MESSAGE( 'ERR_ISO10300_2014_F_YJ_YA_B2','E', ' ', 0, 0 )
CALL MESSOUT( RET )
ENDIF
RETURN
END
any help is gladly appreciated!
thanks a lot,
panagiotis
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like
SUBROUTINE ISO10300_2014_F_YJ_YA_B2(
C EINGABE:
&
C AUSGABE:
& YA, IERR, RET)
should be
SUBROUTINE ISO10300_2014_F_YJ_YA_B2( YA, IERR, RET)
It looks like a partial conversion from Fortran 77 fixed format to Fortran 90 free format, possibly caused by mistake in a format converter which limits line lengths. If you have lines which don't adhere to the fixed format of 6 leading spaces, it may be simpler to finish the free format conversion, by changing the C in column 1 to !, Then you will use a Fortran 90 free format option, either a .f90 file name or /free compile flag to override the treatment of .f and .for files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
panagiotis,
In the future, please paste your code using the {...} button on the tool bar. This will pop-up a dialog box, select Fortran from the pull-down, then paste program into edit box.
If I were to guess at the cause it would be this:
SUBROUTINE ISO10300_2014_F_YJ_YA_B2( C EINGABE: & C AUSGABE: & YA, IERR, RET)
The two comments are considered line terminations (Steve could clarify this). Try:
SUBROUTINE ISO10300_2014_F_YJ_YA_B2( & YA, IERR, RET)
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Panagiotis,
as Tim and Jim have written the continuation entries seems to cause this error. But since the ampersand '&' is in colum 6, this should work with fixed format. Has the standard settings for the *.for files been overwritten by /free compile flag in the compiler settings of your project?
Johannes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all and thanks a lot for the replies!
I tried removing the commented lines but it didn't work. @Johannes i don't know. How can i check it?
Kind Regards,
Panagiotis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Panagiotis,
in VS right click in the project or specific file *.for 'properties' in the new window -> Fortran -> Command Line search for /free
or 'properties' in the new window -> Fortran -> Language -> Source File Format -> /free or /fixed (standard should be 'use file extension')
Further you should check in VS -> Tools -> Options -> In the new window -> Intel Compilers and Tools -> Visual Fortran -> General -> 'Fixed Format Extensions' and 'Free Format Extensions'
Good luck, Johannes
ps. translation of the code to free format and f90+ is worth the time ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks to me as if panagiotis is perhaps using Digital or Compaq Visual Fortran - the reference to df.exe in the build output. Not that this negates any of the advice so far.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Johannes i have tried both free format and fixed but nothing. The thing is, that i have a dozen other subroutines with the same format and only a few produce this error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please attach a ZIP containing the source file and the buildlog.htm from the Debug or Release folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In that case one other way to find out where the error comes from is to write a minimum working example, where you cut out all dependencies to common files and subroutine calls. The error could be placed within a common file...
Also you can change one file entirely to free format (C -> !) continuations to & in the line that should be continued in the next line. Quite fast and easy done for the example above. Don't forget to rename it to .f90. The attached version should work, but I not tested it.
Johannes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your include file (dpgon.cmm) is missing.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Intel) wrote:
Please attach a ZIP containing the source file and the buildlog.htm from the Debug or Release folder.
Good morning,
what is the buildlog.htm?
Kind Regards,
Koutsantonis Panagiotis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jimdempseyatthecove wrote:
Your include file (dpgon.cmm) is missing.
Jim Dempsey
Hello,
it is not missing, it is in another directory in the workspace. The rest of the subroutines that are compiled correctly are linking to the .cmm files without a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From my experience. Probably the file contains special 'non displayable' characters. You should use an editor with hex display capabilities to detect them and convert them to blanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Panagiotis,
the BuildLog.htm is a log file of the build process, which contains the compiler command line (ifort /nologo /MP /O3 /Qparallel /assume:buffered_io /Qopt-matmul /fpp /arch:AVX /Qopenmp ...) and remarks, warnings and errors during the build process. Also linking command and manifest is logged. The BuildLog.htm is normally placed in the ./release or ./debug folders, where the *.obj etc. can be found.
I think it would also be helpful, if you tell us your VS and compiler version. Is it as Steve suggested Digital or Compaq Visual Fortran?
Further, to check for 'non displayable' characters you can activate in newer Visual Studio versions 'View White Space' (edit->advanced->view whithe space). Notepad++ or Scite can show also white space, if it is not available in your Visual Studio version. Further, if you attach the source as zip, someone here can check this...
Johannes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Compaq Visual Fortran it may be buildlog.txt - in the Debug or Release subfolder of the project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
panagiotis k. wrote:
Quote:
jimdempseyatthecove wrote:
Your include file (dpgon.cmm) is missing.
Jim Dempsey
Hello,
it is not missing, it is in another directory in the workspace. The rest of the subroutines that are compiled correctly are linking to the .cmm files without a problem.
Your file was not included in your file up load. Therefore, I (we) could not compile and diagnose your problem.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Luigi R. wrote:
From my experience. Probably the file contains special 'non displayable' characters. You should use an editor with hex display capabilities to detect them and convert them to blanks.
Thanks a lot! You saved me! it was non displayable charcters i was able to get rid of with Notepad++
Kind Regards,
Koutsantonis Panagiotis

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