help with C needed
Fishhook
spw2562 at ritcv.UUCP
Wed Dec 4 07:51:15 AEST 1985
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 at 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...
More information about the Comp.unix
mailing list