Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!rex!uflorida!math.ufl.edu!math.ufl.edu!wang From: wang@math.ufl.edu Newsgroups: comp.lang.fortran Subject: SUN Fortran limitation????? Message-ID: <1991Mar5.031012.12568@math.ufl.edu> Date: 5 Mar 91 03:10:12 GMT Sender: news@math.ufl.edu Reply-To: wang@math.ufl.edu Organization: Department of Mathematics, University of Florida Lines: 31 Hi, you fortran experts! I was writing a test program. I wanted to write a character string with, say, 10000 characters onto an unformatted file. Here is my little program: CHARACTER*1 ch(10000) PRINT *,'Enter a positive integer less than 10000: ' READ *,kk DO 10 i = 1, kk 10 ch(i) = CHAR(67) OPEN(UNIT=12,FILE='bork.out',FORM='unformatted') WRITE(12) (ch(i),i=1,kk) END I had of course no problem on compiling, but the program got crashed when I tried to write an array with more than 8184 characters! The message I got is: *** Segmentation Violation = signal 11 code 3 I tried to find what this message means from the fortran compiler manual, but no such message could be found from it. Can any of you tell me what the catch is? I am running a SUN Sparc IPC with SunOS 4.1.1 and Sun Fortran 1.2. I'd like to ask: Does SUN Fortran have any limitations on the maximum record length of an unformatted file??? If so, such limitations seem not to exist on SUN-3 systems because the above program worked fine for any integers I entered. Are there any bugs in SUN Fortran 1.2? -Liyun