From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,694e2bdb09c0ca09 X-Google-Attributes: gidfee84,public From: Niel Markwick Subject: Re: A Problem of Porting Programs from Sun Solaris 2.x to OSF1 Date: 1998/10/21 Message-ID: <362E05C3.A93D51C8@nospam.euronet.nl>#1/1 X-Deja-AN: 403597530 Content-Transfer-Encoding: 7bit References: <362A4479.1BFE88FC@math.mun.ca> <362B3237.7E35E05@euronet.nl> <362DAF40.CEA2D66C@nospam.euronet.nl> Content-Type: text/plain; charset=us-ascii Organization: Alcatel/Bell Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 Timo Felbinger wrote: > > In C, both > var1[n] > and > *(var1+n) > have the same effect; when adding an integer to a pointer, the size of what > this pointer points to will be taken into account automatically. Whoops! Thanks Timo - I had forgotten about that... Probably because all the pointers in the code I was porting were void*'s and char*'s and were only cast to the proper type after all the arithmetic had been done to get them to point to something reasonable... Niel -- Niel Markwick (remove nospam. to reply to my email address) Consultant Software Engineer Kontich, Belgium.