Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!unmvax!unmvax.cs.unm.edu!haley From: haley@unmvax.cs.unm.edu Newsgroups: comp.sys.mips Subject: Problem(?) with F772.0 Message-ID: <1990Aug3.002936.12125@unmvax.cs.unm.edu> Date: 3 Aug 90 00:29:36 GMT Sender: haley@unmvax.cs.unm.edu (Timothy P. Haley) Reply-To: haley@unmvax.cs.unm.edu () Distribution: usa Organization: University of New Mexico at Albuquerque Lines: 63 Ok, heres an interesting one. Is this a bug or something else? On an RS2030, RISC/OS 4.10, F772.0 : This code works ------------------------------------------------------------------------------ program nl implicit double precision (a,b) namelist /fishing/ a,b c c defaults c a = 1. b = 2. write(6,*) 'Before a = ',a,' b = ',b open(unit=4, file = 'name.inp', err=130) read(4,NML=fishing,end=110,err=120) write(6,*) 'After a = ',a,' b = ',b close(4) stop 110 write(*,*) 'EOF' stop 120 write(*,*) 'error' stop 130 write(*,*) 'error opening' stop end ------------------------------------------------------------------------------ with 'name.inp' having contents: $ fishing b=1D-3 $END We compile and execute and get Before a = 1.000000 b = 2.000000 After a = 1.000000 b = 1.0000000E-03 Which is correct. HOWEVER if we add one line of code putting a and b in a common..... ---------------------------------------------------------------------------- program nl implicit double precision (a,b) common /fish/a,b namelist /fishing/ a,b ---------------------------------------------------------------------------- We compile and execute using the same name.inp and get Before a = 1.000000 b = 2.000000 After a = 1.0000000E-3 b = 2.000000 So, the question is, why? Is this illegal FORTRAN in some way? Is it because we are using double precisions (I did not check it for reals or other data types)? Any ideas? ---------------------------------------------------------------------------- Tim Haley haley@unmvax.cs.unm.edu Part-Time Student Full-Time WorkerBee @Ball Systems Engineering Division Often Confused