C'mon, guys!

Brandon Allbery allbery at ncoast.UUCP
Mon May 26 02:21:25 AEST 1986


Expires:

Quoted from <357 at dg_rtp.UUCP> ["Re: allocating arrays"], by throopw at dg_rtp.UUCP (Wayne Throop)...
+---------------
| > david at ukma.UUCP (David Herron)
| >> throopw at dg_rtp.UUCP (Wayne Throop)
| >>> allbery at ncoast.UUCP (Brandon Allbery)
| >>> | ???
| >>> | Consider an array of 15 pointers to arrays of doubles:
| >>> |     double (*parray[15])[];
| 
| >>> double (*parray[15])[]; means:
| >>>       an indefinitely-sized array of (or a pointer to)
| >>>               an array of 15
| >>>                       (double *)
| 
| >>Wrong.  It means just what the original poster said it meant.  It is an
| >>array of 15 pointers to arrays of double.
| 
| > I respectively submit that you're full of it and that Brandon is correct.
| 
| I exasperatedly submit that I'm quite empty of it, and that Brandon is
| as wrong as wrong can be.  Also, after saying I'm wrong, your examples
| go on to support my position strongly, so you've succeeded in puzzling
| me no end, as well as prolonging this discussion beyond it's natrual
| span.
+---------------

I concede.  But it wasn't pointer-vs.-array that threw me; f[] and *f are
identical, whereas f[5] and *f are NOT and neither are f[] = {3} and *f.
What threw me was getting my insides and outsides confused.  C declarations
are giving me gray hairs!  Anyone for Modula-2?

The declaration is correct, the cast should be to (double **), and MSC is as
screwed up as everything else I've ever seen from Microsoft.  (So what's
new?)  I'm interested in knowing why your sys5 passed it without an illegal
pointer combo message, though.

--Brandon
-- 
decvax!cwruecmp!ncoast!allbery  ncoast!allbery at Case.CSNET  ncoast!tdi2!brandon
(ncoast!tdi2!root for business) 6615 Center St. #A1-105, Mentor, OH 44060-4101
Phone: +01 216 974 9210      CIS 74106,1032      MCI MAIL BALLBERY (part-time)
PC UNIX/UNIX PC - which do you like best?  See <1129 at ncoast.UUCP> in net.unix.



More information about the Comp.unix mailing list