Path: utzoo!utgpu!watserv1!watmath!att!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: a style question Message-ID: <18558@haddock.ima.isc.com> Date: 18 Oct 90 01:32:21 GMT References: <1990Oct6.231143.28186@zoo.toronto.edu> <65263@lanl.gov> <1990Oct12.225501.15701@cbnewsm.att.com> Reply-To: karl@ima.isc.com (Karl Heuer) Distribution: na Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 11 In article <1990Oct12.225501.15701@cbnewsm.att.com> lfd@cbnewsm.att.com (leland.f.derbenwick) writes: >One of the main heritages of the PDP-11 is that most people use >the constructs "*p++" and "*--p" more often than "*++p" and "*p--"; I disagree. My perception is that using half-open intervals (closed on the left) simplifies many algorithms, and the logical way to step through such an object is with *p++ or a[i++] (forward) or *--p or a[--i] (backward). The antisymmetric nature of the PDP-11 addressing modes is the result, not the cause. Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint