>
> I want to compile a program written in Fortran77 with a Fortran90 compiler
> (the cf90 v1.1, to be precise).
> Now, in a line such as
> DATA BLANK/8H /
> I get the following error message: "This Hollerith constant is longer than
> one word."
> Thus I first want to ask you what I have to change. Is it the source code,
> or does there exist some other way to make the compiler accept this
> (obsolete) statement? The online help says
> "A Hollerith constant used as a numeric constant cannot be longer than one
> word."
Paul,
What is BLANK declared as? It should be CHARACTER*8.
Why not change it to
DATA BLANK/' '/
?
(Hollerith constants should be irradicated.)
Your message suggests that BLANK was declared as a numeric variable.
(real, integer, double precision)
If that variable has a machine-dependent length (i.e. integer may be 2, 4
or 8 bytes) and it is not 8 bytes on your machine (the constant is 8
bytes), then you may get
an error message like the one you posted. You might try using
non-standard (but common) fortran77 declarations that explicitly
ask for 8 bytes (e.g. real*8, integer*8, logical*8).
This is not really a fortran90 issue, but it does bring up the
issue of how we should deal with legacy F77 code under F90.
Do you add a single line of F90 code, or do you stick with F77?
----------------------
Chris Bystroff, PhD.
Dept of Biochemistry
Univ. of Washington
Seattle, WA
----------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|