This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: open statement
- To: "r. radna" <radna1-2 at idt dot net>
- Subject: Re: open statement
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Fri, 25 Aug 2000 19:56:51 +0200
- CC: gcc at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <39A5D989.861F716D@idt.net>
r. radna wrote:
> I have a persistent problem with the OPEN statement.
> as in
>
> OPEN(UNIT=JDISK,NAME=NAMEIN,STATUS='OLD')
> ^ INCOMPATIBLE TYPE VARIABLE
>
> NAMEIN is a vector of character type; a variable which I read
> into a file iteratively.
From the source you included it's clear that (as you say) NAMEIN is an
array of characters. Unfortunately, that's not what OPEN expects: It
needs a CHARACTER *variable*, i.e. one string that's declared something
like:
CHARACTER*20 NAMEIN
DATA NAMEIN /'thefilename'/
Hope this helps,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)