home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jal41820
- From: jal41820@uxa.cso.uiuc.edu (Smiley)
- Subject: Segmentation Violation help...
- Message-ID: <Brt9nq.J5t@news.cso.uiuc.edu>
- Summary: help
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Wed, 22 Jul 1992 22:11:49 GMT
- Keywords: help
- Lines: 30
-
-
- In one of the programs I'm working with, I have the following code:
-
- open(unit=13,file=cendata,status='old',form='formatted')
- 1013 format (i4,i4,f8.1,f8.1,f9.4,f8.4)
- 73 read(13,1013,end=93) i,j,dum1,dum2,grid(i,j,1),grid(i,j,2)
- grid(i,j,2) = 0 - grid(i,j,2)
- go to 73
-
- 93 open(unit=14,file=griddata,status='old',form='formatted')
-
- (etc...)
-
- Now, all the variables are declared (the file is a variable). The file
- exists. The format statement is correct. All lines referenced in go to's
- are existant. Better yet, I used this segment exactly as is before with
- no problems. However, now I get a segmentation violation, something
- about signal 11, code 3, and am told there may be a problem with line
- numbers and library calls. I put a write statement just above the
- go to 73, and discovered the program reads through 52 lines of the file,
- then gives this error. I checked it with other files of the same format,
- and looked at the file itself. No problems there. If anyone has any ideas,
- please let me know... thanks.
-
-
- --
- Josh Laff # #
- email to: smiley@uiuc.edu _ _ Hello! I am a signature virus!
- (217) 356-6079 |#\_____/#| Join the fun and copy mo*#(*&^!>.
- \#######/
-