Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Question on structures Message-ID: <1656@haddock.ISC.COM> Date: Tue, 10-Nov-87 11:59:20 EST Article-I.D.: haddock.1656 Posted: Tue Nov 10 11:59:20 1987 Date-Received: Thu, 12-Nov-87 21:37:25 EST References: <1025@phoenix.Princeton.EDU> <8888@utzoo.UUCP> <608@l.cc.purdue.edu> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 21 In article <608@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: >Since "a pointer is a pointer is a pointer", someone like myself who does not >believe in requiring strong typing would like to have a type "pointer" which >can be any type of pointer. This would help since I could use pointer array. /* ENFLAME */ Since all the world's a VAX, someone like yourself would probably be better off using assembler. /* DEFLAME */ There is a "universal pointer type"; it's called "char *" in K&R C and "void *" in ANSI. (Added to distinguish generic pointers from char pointers, but otherwise pretty much equivalent to "char *".) What this means is that any pointer type can be cast into "void *" and back again. It does not imply that all pointer types are the same format or size. The existence of "pointer to array" is an independent issue. In a sense, it's always been legal, but PCC-based compilers have traditionally misinterpreted any attempts to use such an object. ANSI has fixed this. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint