Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!rutgers!orstcs!nucthy.physics.orst.edu!sagen From: sagen@nucthy.physics.orst.edu (Milt Sagen) Newsgroups: comp.sys.mac.programmer Subject: RE: Initializing automatic arrays Keywords: MPW 3.0, LSC 3.0 Message-ID: <9233@orstcs.CS.ORST.EDU> Date: 6 Mar 89 01:34:55 GMT Sender: usenet@orstcs.CS.ORST.EDU Reply-To: sagen@nucthy.physics.orst.edu (Milt Sagen) Distribution: na Organization: Dept. of Physics, Oregon State University Lines: 33 In article <28295@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes: > >this program has numerous errors, and certainly doesn't do what the >author intended. Notice that Milt uses parentheses to delimit his list of >constants: That makes the whole thing be a constant expression that >returns its last component as its value. So, what he has is equivalent to >real coef[1] = 0.536382e-5; Sorry about that, I think I was programming in Caspal (a mix of C and Pascal), at the time. >Note further that even if he had used >squiggly braces, there is a comma missing at the end of the first line, so >he will get a 5 element array of which coef[2] == 24.01409822 - 1.231739516; Yea, I caught the missing ',' right after I posted... >I am surprised that MPW C passed the original without complaint. I like >compilers to point out errors in my code. I was surprised at first, now I'm shocked. >--- David Phillip Oster --"When we replace the mouse with a pen, Thanks David. BTW: Have you upgraded the calender DA beyond 1.8? Milt Sagen Internet: sagen@nucthy.physics.orst.edu Department of Physics Oregon State University Corvallis, OR 97331 Tele: (503) 754-4631