Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!masscomp!ftw From: ftw@masscomp.UUCP (Farrell Woods) Newsgroups: comp.lang.c Subject: Re: Another silly question Message-ID: <765@masscomp.UUCP> Date: 28 Apr 89 14:40:43 GMT References: <2459@nmtsun.nmt.edu> Reply-To: ftw@quasar.masscomp.UUCP (Farrell Woods) Organization: Concurrent Computer Corporation - Westford, Ma Lines: 32 In article <2459@nmtsun.nmt.edu> kelly@titan.nmt.edu (Sean Kelly) writes: >My CS instructor and I disagree about a certain moot point. I have a text >book which says that > *(a + i) and a[i] >are equivalent, given an array a, and int index i ... each gives the >value stored in a[i]. But he says that > *(a + i) >is non-standard and would not expect it do go far on all _real_ C compilers [deleted] >What do you think? I think your Sun and your Vax are better authorities on C than your instructor. So are you, for that matter. If the Sun and Vax compilers aren't "real" in your instructors terms, whaich compilers are? What you describe is simple pointer math. Find a K&R 1 and have your instructor start reading at the paragraph beginning near the top of page 94. -- Farrell T. Woods Voice: (508) 392-2471 Concurrent Computer Corporation Domain: ftw@masscomp.com 1 Technology Way uucp: {backbones}!masscomp!ftw Westford, MA 01886 OS/2: Half an operating system