- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a problem compiling an old FortranIV Program. I really do not understand the error message I get when I try to compile the program. Since I re-typed the program, I cannot ensure it is free of bugs, but still after double-checking, I do not see a mistake.
Thanks for your help.
Florian
Here comes the error message:
fortcom: Error: /home/hiwiad00/BOERGER_070510.f, line 154: Syntax error, found END-OF-STATEMENT when expecting one of: = .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
35 ETAG(I,1)=ETAG(I,1)+GISELA(AK(NPO1),AK(NPO2),AK(NPO3),AK(NPO4),XI(NPO1),XI(NPO2),XI(NPO3),XI(NPO4),XIG(I))
------------------------------------------------------------------------------------------------------------------^
fortcom: Error: /home/hiwiad00/BOERGER_070510.f, line 145: An unterminated block exists.
Do 35 II=1,NA
^
fortcom: Error: /home/hiwiad00/BOERGER_070510.f, line 145: This label is undefined. [35]
Do 35 II=1,NA
--------------------------------^
compilation aborted for /home/hiwiad00/BOERGER_070510.f (code 1)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have reduced the problem to the following line:
ETAG(I,1)=ETAG(I,1)+GISELA(AK(NPO1),AK(NPO2),AK(NPO3),AK(NPO4),XI(NPO1),XI(NPO2),XI(NPO3),XI(NPO4),XIG(I))
What ist wrong with this line? It seems like the compiler expects some sort of logical extension (OR, AND, XOR...) but this is an Equation within an Iteration...
If you need additional information, please let me know. the whole program consists of 190 lines, so I could post it as a txt-file.
Thanks for helping me!
Florian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The line is much too long for a FORTRAN IV statement, which is limited to 72 characters. If the file type is .f or .for, then it is fixed-form source and has the 72-character limit/
I suggest attaching the source to a reply so we can see what we're dealing with. I don't want to give advice based on an assumption.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That was one of the problems. Attached is the file, I have made some changes to the original version, especially defining "Gisela" as a function.
Another big problem are the "format" entries - when I activate these (delete the "c" at the beginning of the line) I get a lot of error messages. What is wrong with these format definitions?
If you see any big mistakes, please let me know! Thank you so much for your support. You really help me a lot!
Florian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fixed-form source has peculiar rules. The statement number field (the "15" in the FORMAT) must be in columna 1-5. Continuation indicators, which are the digits 1 and2 in this case, must be in column 6. The statement text itself starts in column 7 and runs through 72. Further complicating is that this source file has tabs, which can confuse things.
The format should look like this:
!234567 15 FORMAT (' RMAX='F10.6,'M'/' EM ='F10.6/' XL = 'F10.6/' WH = 1 'F10.6/' WL = 'F10.6/' WS='F10.6/' DD ='F10.6/' 2 XV ='F10.6/' DX = 'F10.6,'M')
Delete any tabs in these lines and make sure the spacing is as shown.
One additional problem I see is line 68, which is one character too long. Just remove the space before GISELA and you shouldbe ok.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
at least I can compile the program now. Now I still have some problems with the formula, but that is more physics than programming (hopefully).
Thanks a lot!
If I find new problems excelling my programming skills - I will bother you again!
![Open-mouthed smiley [:-D]](/isn/Community/en-US/emoticons/emotion-2.gif)
Thanks!

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