home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / fortran / 2804 < prev    next >
Encoding:
Text File  |  1992-07-22  |  1.7 KB  |  43 lines

  1. Newsgroups: comp.lang.fortran
  2. 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
  3. From: jal41820@uxa.cso.uiuc.edu (Smiley)
  4. Subject: Segmentation Violation help...
  5. Message-ID: <Brt9nq.J5t@news.cso.uiuc.edu>
  6. Summary: help
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Date: Wed, 22 Jul 1992 22:11:49 GMT
  10. Keywords: help
  11. Lines: 30
  12.  
  13.  
  14. In one of the programs I'm working with, I have the following code:
  15.  
  16.       open(unit=13,file=cendata,status='old',form='formatted')
  17.  1013 format (i4,i4,f8.1,f8.1,f9.4,f8.4)
  18.    73 read(13,1013,end=93) i,j,dum1,dum2,grid(i,j,1),grid(i,j,2)
  19.       grid(i,j,2) = 0 - grid(i,j,2)
  20.       go to 73
  21.  
  22.    93 open(unit=14,file=griddata,status='old',form='formatted')
  23.  
  24. (etc...)
  25.  
  26. Now, all the variables are declared (the file is a variable). The file
  27. exists. The format statement is correct. All lines referenced in go to's
  28. are existant. Better yet, I used this segment exactly as is before with
  29. no problems. However, now I get a segmentation violation, something
  30. about signal 11, code 3, and am told there may be a problem with line
  31. numbers and library calls. I put a write statement just above the
  32. go to 73, and discovered the program reads through 52 lines of the file,
  33. then gives this error. I checked it with other files of the same format,
  34. and looked at the file itself. No problems there. If anyone has any ideas,
  35. please let me know... thanks.
  36.  
  37.  
  38. -- 
  39.         Josh Laff              #     #      
  40. email to: smiley@uiuc.edu     _       _     Hello! I am a signature virus!  
  41.       (217) 356-6079         |#\_____/#|    Join the fun and copy mo*#(*&^!>.
  42.                               \#######/     
  43.