Problem with Suns F77 compiler 
Author Message
 Problem with Suns F77 compiler

I have encountered a problem compiling a fortran program with a medium
sized data statement on a sun. The same program compilers without error
on (vms,ultrix,osf,irix), but bombs on compilation because the data
statement is too long.

        100 character*16 variables doesnt work, but it does compile with

        75 character*16 variables.

I'm using f77 version 1.4 without any patches on a SS2 RUNNING SUNOS 4.1.2.

Anyone aware of this? Is there a Fix?. I presume someone has encountered
this before.

Anyhelp Appreciated!

/Geo
--
                  George Travan "A Rebel Without A Clue!"                  

     Phone: (Australia) +61 08 228 5968   Fax: (Australia) +61 08 224 0464  
        University of Adelaide,G.P.O Box 498 Adelaide, AUSTRALIA 5001      



Mon, 09 Jun 1997 06:45:39 GMT  
 Problem with Suns F77 compiler

: I have encountered a problem compiling a fortran program with a medium
: sized data statement on a sun. The same program compilers without error
: on (vms,ultrix,osf,irix), but bombs on compilation because the data
: statement is too long.

If I understand your problem correctly, your line is too long.  If that
is the case, then use -Nl250 (NOT -N1250).




Tue, 10 Jun 1997 08:58:25 GMT  
 Problem with Suns F77 compiler


Quote:

> I have encountered a problem compiling a fortran program with a medium
> sized data statement on a sun. The same program compilers without error
> on (vms,ultrix,osf,irix), but bombs on compilation because the data
> statement is too long.

>         100 character*16 variables doesnt work, but it does compile with

>         75 character*16 variables.

> I'm using f77 version 1.4 without any patches on a SS2 RUNNING SUNOS 4.1.2.

It sounds like you must be breaking the 19 continuation line limit of
ANSI Fortran 77.  Sun Fortran has an option to extend the limit -
something like -Nl50 I think, but try man f77 to find out for sure.  A
better solution is to break the data statement into several parts, using
implied DO loops - that way you stay within the standard.

      DATA  (zzz(i),i=1,50) /'   ',....

      DATA  (zzz(i),i=51,100) /'   ',....

-- John Appleyard

Polyhedron Software Ltd.
Linden House
93 High St.                     Tel. +44(0)1865-300579
Standlake                       Fax. +44(0)1865-300232
WITNEY                          Compuserve 100013,461

United Kingdom



Tue, 10 Jun 1997 18:15:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Strange problem with Sun-f77 compiler.

2. Array sizes on Sun f77 compiler

3. F90 Sun compilers [Was: Migration from F77]

4. Which f77 compiler is correct (Sun, Linux)?

5. Sun F77 compiler with Vax binary file Query

6. MOD intrinsic with the sun f77 compiler

7. Write to stderr: How? (Sun f77 compiler)

8. static storage compiler switch for Sun f77?

9. Sun F77 compiler

10. "-r8" option on Sun F77 compiler

11. Sun f77 Compiler "-r8" Option

12. SUN f77 to HP f77 converter

 

 
Powered by phpBB® Forum Software