Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

An unhelpful error message

2 views
Skip to first unread message

Ralph Dadswell

unread,
Dec 25, 1998, 3:00:00 AM12/25/98
to
I'm using Fortran Powerstation 4.0, and am getting an error message which
prevents me from building projects. (When I use Powerstation 1.0, the same
projects compile fine.)

The problem comes when I insert a particular file into a project. When I
try to build, a message appears, saying: (names substituted)

The source files "problem.for" and "mainprog.for" are both configured to
produce the output file "blahblah\=.mod". The project cannot be built.

There's no error number, and the only option is OK.

Doing a Properties on the "problem.for" confirms that Output is indeed set
up as the message said. How can I change this? How did it get set? As far
as I can see, the file is just a subroutine, nothing more.

Any help would be gratefully received. I attach the code (minus comments!)
below.

Cheers,
ralph.d...@bigfoot.com


SUBROUTINE CRRND5(VALUE,RNDTYP,N,RNDFCT,REPIN,MODIN,
+ REPCOD,MODULE,RNDVAL)

IMPLICIT NONE

INTEGER*2 N,REPCOD(2)
INTEGER*4 RNDVAL,RNDFCT
CHARACTER*1 RNDTYP
CHARACTER*4 REPIN
CHARACTER*6 MODIN,MODULE
DOUBLE PRECISION VALUE

INTEGER*2 RepInI
LOGICAL OK


REPCOD(1) = 0

CALL CRRND4(VALUE,RNDTYP,N,RNDFCT,OK,RNDVAL)

IF (.NOT.OK) THEN
READ(RepIn,'(I4)') RepInI
IF(REPINI.LE.2000 .or. REPINI.GE.3000) THEN
REPCOD(1) = 3912
GOTO 998
ENDIF
REPCOD(1) = REPINI
MODULE = MODIN
GOTO 999
ENDIF

9999 RETURN

998 MODULE = 'CRRND5'

999 RNDVAL = 0
RETURN
END

Carter Smith

unread,
Dec 30, 1998, 3:00:00 AM12/30/98
to
Looks like the problem is that you have a subroutine argument called MODULE.
You can work around the problem by (1) changing the name of the MODULE
argument to something else (like MODULE1, perhaps), then (2) selecting
"Update All Dependencies" from the Build menu.

In Fortran 90 (hence in PowerStation 4.0), there is a new language feature
called a MODULE, and the presence of an argument called MODULE is confusing
the dependency scanner. In particular the lines of the form "MODULE = FOO"
make the dependency scanner think that you are declaring a new module called
"=". This is why "outputdirectory\=.mod" appears as an output for the file.
PowerStation 1.0 did not support Fortran 90 or modules, so this problem
would not have occurred there.

--Carter

Ralph Dadswell wrote in message <7616hc$1bg$1...@news7.svr.pol.co.uk>...

Richard Maine

unread,
Dec 31, 1998, 3:00:00 AM12/31/98
to
"Carter Smith" <Cart...@msn.com> writes:

> Looks like the problem is that you have a subroutine argument called MODULE.

...


> In Fortran 90 (hence in PowerStation 4.0), there is a new language feature
> called a MODULE, and the presence of an argument called MODULE is confusing

> the dependency scanner....

I don't know enough about Powerstation 4.0 to evaluate whether this
analysis is accurate (though it certainly sounds plausible). I tried
it briefly, but finally gave up because of the innumerable bugs.

I just want to clarify that, if this is the problem, then it is a bug
in the compiler (one that I didn't happen to run into). The Fortran
language has no restrictions against variables with names that look
like language keywords. The syntax of the language always gives a
unique interpretation in any particular context of whether it is the
variable name or the keyword. I wouldn't generally advise it as good
practice, but it should work....at least with any decent compiler.

--
Richard Maine
ma...@altair.dfrc.nasa.gov

Ralph Dadswell

unread,
Jan 1, 1999, 3:00:00 AM1/1/99
to
Thanks for your comments. I can confirm that MODULE is accepted as a
variable. I'll admit that I wouldn't choose to use it if I was starting
from scratch, but it features in almost all the rest of the 1000+ programs
in my "work" directory.

Since posting the original message, I've worked around the problem in the
short term by editing the makefile. But this happens for every project
which features a "problem" file, and so isn't viable long-term.

I need to find out what triggers the code which creates the .mak

It's sounds as though it might get more technical than I would like.

Richard Maine wrote in message ...

Carter Smith

unread,
Jan 2, 1999, 3:00:00 AM1/2/99
to
It's a minor technical point, but as I stated in my original post, this is a
bug in the dependency scanner, which is an independent component from the
compiler. AFAIK the compiler can handle this code without problems. The
error message from the original post was not generated by the compiler, as
the compiler hadn't even been called yet. (If anyone is interested, I could
go into more detail....)

You are correct that this is a problem with the product, and not the Fortran
language itself.

--Carter

Richard Maine wrote in message ...
>"Carter Smith" <Cart...@msn.com> writes:
>
>> Looks like the problem is that you have a subroutine argument called
MODULE.
> ...
>> In Fortran 90 (hence in PowerStation 4.0), there is a new language
feature
>> called a MODULE, and the presence of an argument called MODULE is
confusing
>> the dependency scanner....

> [snip]


>I just want to clarify that, if this is the problem, then it is a bug
>in the compiler (one that I didn't happen to run into). The Fortran
>language has no restrictions against variables with names that look
>like language keywords. The syntax of the language always gives a
>unique interpretation in any particular context of whether it is the
>variable name or the keyword.

>[snip]


0 new messages