Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!im4u!ut-sally!pyramid!nsc!amdahl!jon From: jon@amdahl.UUCP (Jonathan Leech) Newsgroups: net.lang.c Subject: Re: Pointers and Arrays Message-ID: <3523@amdahl.UUCP> Date: Thu, 7-Aug-86 15:51:14 EDT Article-I.D.: amdahl.3523 Posted: Thu Aug 7 15:51:14 1986 Date-Received: Sat, 9-Aug-86 09:08:30 EDT References: <1242@ncoast.UUCP> <418@dg_rtp.UUCP> <1267@ncoast.UUCP> <513@hadron.UUCP> Organization: Amdahl Corp, Sunnyvale CA Lines: 31 In article <513@hadron.UUCP>, jsdy@hadron.UUCP (Joseph S. D. Yao) writes: > I have seen several references to the address of an array vs. > the address of the first element of the array. Would someone > care to address what they think this difference is, aside from > data type? I.e., it is clear that the types *int and *(int[]) > should be different. But the values should be the same: > int countdown[] = { 10, 9, 8, ... }; > gives something like > _countdown: > => .word 10 > .word 9 > .word 8 > ... > The values of both addresses should be the address of the word > '10'. > > Well, yes, in some theoretical architectures I've heard tell of > pointers include arbitrary information on e.g. the size of the > object. Any of these actually implemented? You could implement pointers as a triple: (low address, length, offset of current member) for range checking. Doesn't the Symbolics machine do something like this? I recall a reference in a C compiler manual for the Symbolics but have never actually used the machine or compiler. -- Jon Leech (...seismo!amdahl!jon) UTS Products / Amdahl Corporation __@/