Silverfrost Forums

Welcome to our forums

Help with code

17 Dec 2007 12:10 #2509

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)...

  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.

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

      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]

17 Dec 2007 2:39 #2510

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.

17 Dec 2007 6:48 #2515

Andrew

      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:-

      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

Please login to reply.