Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!hsdndev!cmcl2!acf3!mcqueen From: mcqueen@acf3.NYU.EDU (David McQueen) Newsgroups: comp.lang.fortran Subject: Re: integer variable format address Message-ID: <1600001@acf3.NYU.EDU> Date: 2 Mar 91 20:29:00 GMT References: <6769@idunno.Princeton.EDU> Sender: notes@cmcl2.nyu.edu (Notes Person) Organization: New York University Lines: 33 Nntp-Posting-Host: acf3.nyu.edu /* acf3:comp.lang.fortran / hsbrown@lemmy.Princeton.EDU (Scott Brown) / 6:05 pm Mar 1, 1991 */ > What is wrong with the following program? > program test > integer k > k=1 > write(*,k) > > 1 format('here is line 1') > end > > > > I have two FORTRAN books that suggest the write(*,k) > statement should work. I have two FORTRAN compilers > that give a bus error. Any ideas would be appreciated. > Scott Brown > (hsbrown@lemmy.princeton.edu) If you replace the line k=1 with assign 1 to k it works just fine in f77 on a Sun 3/50. If you try to replace the 1 in the assign statement with a variable, the compiler complains. --Dave McQueen /* ---------- */