Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site inuxc.UUCP Path: utzoo!watmath!clyde!floyd!harpo!ihnp4!inuxc!mcferrin From: mcferrin@inuxc.UUCP (P McFerrin) Newsgroups: net.lang.c Subject: Re: pointer question Message-ID: <937@inuxc.UUCP> Date: Thu, 5-Apr-84 10:35:28 EST Article-I.D.: inuxc.937 Posted: Thu Apr 5 10:35:28 1984 Date-Received: Sat, 7-Apr-84 02:44:07 EST References: <7624@mgweed.UUCP> Organization: AT&T Consumer Products Div., Indianapolis Lines: 16 A pointer has a length associated with it. The reason for this is that it permits such operations as auto-increment/decrement. If the pointer is to a char, then an autoincrement operation would bump the pointer value by 1. On the other hand, the pointer was to 64 byte complex structure, an autoincrement operation would increment the pointer value by 64. The compiler takes care of the boundary allignment problems which will result in the length of a pointer being adjusted to maintain proper boundary allignment. 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 AT&T Consumer Products ...ihnp4!inuxc!mcferrin