|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
AndrewLindsay
Joined: 16 Dec 2007 Posts: 2 Location: Perth, Australia
|
Posted: Mon Dec 17, 2007 1:10 pm Post subject: Help with code |
|
|
Hello, I have found the issue with my 'can't find FTN77' error.
Now when I try to compile the following code (just a snippet), with the first line as Line 49 (Label 101)...
Code: |
101 R=DIA/2.
RH=R/H
GS=E*(H/R)**3 /(36.*(1.-PR*PR))
IF (IDF.EQ."BF") GS=1000.
GR=DWTT
IF(CV.GT.0.0) GR=CV*4.0
C
C PRINT PIPE AND SOIL PARAMETERS
CODE1=10H NO BACKFI
CODE2=10HLL
IF (IDF.EQ.2HBF) CODE1=10H BACKFILL
IF (IDF.EQ.2HBF) CODE2=10H
PRINT 10,CODE1,CODE2,IDENT
10 FORMAT (1H1,10X,*INPUT FOR PIPELINE WITH*,2A10,2X,
+ 2A9//)
PRINT 11, DIA,H,Y,PL,CV,DWTT
11 FORMAT (20X,*PIPE DIAMETER =*,F10.2,* IN*/
+ 20X,*WALL THICKNESS =*,F10.5,* IN*/
+ 20X,*YIELD STRESS =*,F10.2,* PSI*/
+ 20X,*LINE PRESSURE =*,F10.2,* PSI*/
+ 20X,*CHARPY ENERGY =*,F10.2,* IN.LB./IN/IN*/
+ 20X,*DWTT ENERGY =*,F10.2,* IN.LB./IN/IN*/
+ //)
|
I get the following errors.
Code: |
M:\Source.FOR(59) : warning 65 - Label 101 is on a continuation line, ignoring label
M:\Source.FOR(59) : error 66 - Invalid characters in label field of FIXED format source
M:\Source.FOR(59) : error 58 - Unpaired right bracket(s)
M:\Source.FOR(61) : warning 65 - Label 10 is on a continuation line, ignoring label
M:\Source.FOR(61) : error 66 - Invalid characters in label field of FIXED format source
M:\Source.FOR(65) : error 441 - Illegal character combination, '*' followed by '/'
M:\Source.FOR(66) : error 441 - Illegal character combination, '*' followed by '/'
M:\Source.FOR(67) : error 441 - Illegal character combination, '*' followed by '/'
M:\Source.FOR(68) : error 441 - Illegal character combination, '*' followed by '/'
M:\Source.FOR(69) : error 441 - Illegal character combination, '*' followed by '/'
M:\Source.FOR(70) : error 441 - Illegal character combination, '*' followed by '/'
|
Can anyone give me guidance as to what these errors are and how to fix them?
Also, what do the lines
Code: |
CODE1=10H NO BACKFI
CODE2=10HLL
IF (IDF.EQ.2HBF) CODE1=10H BACKFILL
IF (IDF.EQ.2HBF) CODE2=10H
|
do, i.e. what does the cryptic (to me at least) '2HBF' mean?
Regards
Andrew[/code] |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Mon Dec 17, 2007 3:39 pm Post subject: |
|
|
When using fixed format Fortran, a character (other than a space or a zero) in column 6, marks this line as a continuation of the line before.
Such a line must not have a label.
Make sure that the code does not contain any tab characters.
These can cause this kind of problem.
In Plato you can view white-space characters by selecting an option in the Options dialog box. |
|
Back to top |
|
|
JohnHorspool
Joined: 26 Sep 2005 Posts: 270 Location: Gloucestershire UK
|
Posted: Mon Dec 17, 2007 7:48 pm Post subject: |
|
|
Andrew
Code: | CODE1=10H NO BACKFI
CODE2=10HLL
IF (IDF.EQ.2HBF) CODE1=10H BACKFILL
IF (IDF.EQ.2HBF) CODE2=10H |
This is the "old" style hollerith statement for setting character string variables, which dates your code at least back to the Fortran IV era. The 10 in 10H means that there are 10 characters in the variable, the 10 characters after the H is the character string assigned to the variable.
Thus in Fortran 77 and since:-
Code: |
CODE1=" NO BACKFI"
CODE2="LL "
IF (IDF.EQ."BF") CODE1=" BACKFILL "
IF (IDF.EQ."BF") CODE2=" " |
You should certainly not use Hollerith statements in new code!
John |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|