From: Niel Markwick <nielm@nospam.euronet.nl>
Subject: Re: A Problem of Porting Programs from Sun Solaris 2.x to OSF1
Date: 1998/10/21 [thread overview]
Message-ID: <362E05C3.A93D51C8@nospam.euronet.nl> (raw)
In-Reply-To: Pine.LNX.3.96.981021130334.21032E-100000@uranos.quantum.physik.uni-potsdam.de
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.
next prev parent reply other threads:[~1998-10-21 4:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-18 4:00 A Problem of Porting Programs from Sun Solaris 2.x to OSF1 Yingwei Peng
1998-10-19 4:00 ` Finnbarr P. Murphy
1998-10-19 4:00 ` Niel Markwick
1998-10-21 4:00 ` Niel Markwick
1998-10-21 4:00 ` Timo Felbinger
1998-10-21 4:00 ` Niel Markwick [this message]
-- strict thread matches above, loose matches on Subject: below --
1998-10-24 4:00 Yingwei Peng
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox