problems reading namelists in MS FORTRAN PowerStation 
Author Message
 problems reading namelists in MS FORTRAN PowerStation

I'm having problems reading namelists in Microsoft fortran
PowerStation Version 1. In the following test program, as soon
as we get to the read statement, execution jumps straight to
the end of file label.  How can I get it to execute the write
statement directly after the read?  I have some code that was
written for VAX fortran which I'm trying to compile for my PC.

      namelist /example/ a,b,c,i
      open(unit=1,file='nmltst.dat',status='OLD')
      a=1.0
      b=1.0
      c=1.0
      i=1
      write(6,example)
      read(1,example,err=98,end=99)
      write(6,example)
      goto 999
   98 write(6,*) 'ERROR'
      goto 999
   99 write(6,*) 'END OF FILE'
      write(6,example)
  999 close(unit=1)
      stop
      end

The file nmltst.dat contains the following line.
 &example b=3.0, i=7 &end

On the VAX I get the following output:
$ run tst
$EXAMPLE
A       =   1.000000    ,
B       =   1.000000    ,
C       =   1.000000    ,
I       =           1
$END
$EXAMPLE
A       =   1.000000    ,
B       =   3.000000    ,
C       =   1.000000    ,
I       =           7
$END
FORTRAN STOP

But on the PC I get something like:
&EXAMPLE
A       =   1.000000    ,
B       =   1.000000    ,
C       =   1.000000    ,
I       =           1
/
END OF FILE
&EXAMPLE
A       =   1.000000    ,
B       =   3.000000    ,
C       =   1.000000    ,
I       =           7
/
FORTRAN STOP

Any help would be most appreciated.

---
Paul{*filter*}man

Radiumhemmet                      Phone: +46 8 729 5599
Karolinska University Hospital    Fax:   +46 8 326 113            
171 76 Stockholm, Sweden  



Sun, 24 Aug 1997 01:06:38 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. BUG:MS Powerstation 4.0 - Error reading namelist file?

2. MS Powerstation NAMELIST Problem

3. Ms Fortran 5.1 or MS Fortran Powerstation

4. Ms Fortran 5.1 or MS Fortran Powerstation

5. MS Powerstation bug using NAMELIST?

6. Problem with MS FORTRAN PowerStation and 32-bit file/disk access

7. MS Fortran PowerStation 4.0 / Windows NT problem

8. HELP: More problems with MS Fortran PowerStation 4.0

9. MS Fortran Powerstation Linking problem

10. EOF + Backspace problem in MS Fortran PowerStation

11. MS fortran powerstation/winNT problem

 

 
Powered by phpBB® Forum Software