Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP Path: utzoo!watmath!clyde!floyd!whuxle!mit-eddie!barmar From: barmar@mit-eddie.UUCP (Barry Margolin) Newsgroups: net.lang.c Subject: Re: pointer question Message-ID: <1559@mit-eddie.UUCP> Date: Fri, 6-Apr-84 01:03:24 EST Article-I.D.: mit-eddi.1559 Posted: Fri Apr 6 01:03:24 1984 Date-Received: Sat, 7-Apr-84 04:39:53 EST References: <7624@mgweed.UUCP> <937@inuxc.UUCP> Organization: MIT, Cambridge, MA Lines: 15 -------------------- It is dangerous to increment pointer yourself (e.g. p = p + 4). By doing so, you are restricting your programs to a specific machine type since wordsize varies among diffenent machines. (a act against portability) Paul McFerrin -------------------- I don't have my K&R handy, but I thought that adding an int to a pointer was defined to scale the int appropriately. There is nothing special about auto-increment in this regard. -- Barry Margolin ARPA: barmar@MIT-Multics UUCP: ..!genrad!mit-eddie!barmar