Silverfrost Forums

Welcome to our forums

READ compile error 262 REC option not permitted with END

4 Feb 2010 9:36 #5892

While converting my MS Powerstation fortran 77 program using PLATO 4.3 the following fragment does not compile:

... read(lun,fmt=100,rec=record,end=888,err=999)(alfa(i),i=1,max) 100 format(1024a1) ...

While compiling I get the message: error 262 - The REC option is not permitted with END

I realize you can't argue with the compiler, but the .pdf documentation seems to indicate these are compatible. Everything compiled and worked under previous MS compiler. Is there something else I'm missing? Thanks in advance!

5 Feb 2010 2:28 #5895

why don't you try:

read (lun,fmt=100, rec=record, iostat=iostat) (alfa(i),i=1,max) if (iostat /= 0) then write (,) 'Error reading ',lun,' IOSTAT = ',iostat ... end if

Find out what are the possible errors. Certainly having the value of 'record' pointing past the end of the defined file will give a non-zero value for iostat. FORTRAN_ERROR_MESSAGE@ may help to understand the possible errors.

5 Feb 2010 8:02 #5899

Mike,

Everything compiled and worked under previous MS compiler.

I hope you appreciate that this does not mean that the MS compiler was better than Silverfrost FTN95 ! To have 'END=' with a direct access file is meaningless (as John pointed out) and probably illegal, thus the MS compiler was making an error in allowing it.

John

Please login to reply.