Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ritcv.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!ut-sally!seismo!rochester!ritcv!spw2562 From: spw2562@ritcv.UUCP (Fishhook) Newsgroups: net.unix Subject: help with C needed Message-ID: <9103@ritcv.UUCP> Date: Tue, 3-Dec-85 16:51:15 EST Article-I.D.: ritcv.9103 Posted: Tue Dec 3 16:51:15 1985 Date-Received: Fri, 6-Dec-85 06:47:37 EST Reply-To: spw2562@ritcv.UUCP (Fishhook) Distribution: net Organization: Rochester Institute of Technology, Rochester, NY Lines: 49 I've been having some trouble initializing an array of double's in a program I'm writing at work. It's TRS-Xenix v3.0(?) on a trs model 16 68000 processor. I've tried several ways of initializing it, but all except one would not compile. The only on that would compile causes a segmentation violation and a core dump on the first assignment. Partial listings follow: Won't compile: double fha[] = { 1.0, 0.9814, ... ... 0.0 } ; double *fha = { 1.0, 0.9814, ... ... 0.0 } ; double fha[31] = { 1.0, 0.9814, ... ... 0.0 } ; Causes core dumps: double fha[31]; fha[0] = 1.0; /* coredumpola!!! */ fha[1] = 0.9814; ... fha[30] = 0.0; There are exactly 31 elements in the array. In the last version, the core dump occurs when I start assigning. I've tried substituting float for double but that does diddlysquat. Any suggestions would be greatly appreciated. ============================================================================== Steve Wall @ Rochester Institute of Technology USnail: 6675 Crosby Rd, Lockport, NY 14094, USA Usenet: ..!rochester!ritcv!spw2562 (Fishhook) Unix 4.2 BSD BITNET: SPW2562@RITVAXC (Snoopy) VAX/VMS 4.2 Voice: Yell "Hey Steve!" Disclaimer: What I just said may or may not have anything to do with what I was actually thinking...