 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Mike Cheek
Joined: 09 Jul 2008 Posts: 11 Location: Houston, TX
|
Posted: Thu Feb 04, 2010 10:36 pm Post subject: READ compile error 262 REC option not permitted with END |
|
|
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! _________________ Mike Cheek |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Fri Feb 05, 2010 3:28 am Post subject: |
|
|
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. |
|
Back to top |
|
 |
JohnHorspool
Joined: 26 Sep 2005 Posts: 270 Location: Gloucestershire UK
|
Posted: Fri Feb 05, 2010 9:02 am Post subject: |
|
|
Mike,
Quote: | 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 |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|