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