How to solve this - input/output keyword is invalid

How to solve this - input/output keyword is invalid

 

Hello All,

can some somebody help me what is the following bug 

error:  #6640: This input/output keyword is invalid.

error #6332: A UNIT= specifier is required for this I/O operation.

#ifdef CONM2_OUT
   tempstr = './output/CS.conm2_', iloop
   call mg1g12conm2(CS_ID, tempstr)
#endif

 

4 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Post the actual code that caused the error message. There are no recognizable I/O statements in the fragment posted, but it is hard to tell without seeing the relevant variable and type declarations.

The statement

tempstr = './output/CS.conm2_', iloop
appears suspicious. What is it supposed to do? Perhaps,
write(tempstr,'(A,I0)')'./output/CS.conm2_', iloop
is what was intended?

Well, you've only shown a brief excerpt of your code.

As mecej4 says -- the tempstr assignment appears strange, not valid. (I0 is probably not correct in his reply, but otherwise, it is right on track)

Linda

Cita:

I0 is probably not correct in his reply

Linda,

The specification of a zero field width is allowed. It helps produce a minimal length string of digits (no leading blanks or zeros) from an integer. Section 10.7.2.1, Rule (2) of the Fortran 2008 standard says
Cita:

(6) On output, with I, B, O, Z, F, and G editing, the specified value of the field width w may be zero. In such cases, the processor selects the smallest positive actual field width that does not result in a field filled with asterisks.

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi