Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!mcvax!unido!qtecmuc!ger
From: ger@qtecmuc.UUCP
Newsgroups: comp.sys.atari.st
Subject: Re: Bug in Alcyon C v4.14 - (nf)
Message-ID: <19400009@qtecmuc.UUCP>
Date: Mon, 6-Jul-87 07:20:00 EDT
Article-I.D.: qtecmuc.19400009
Posted: Mon Jul  6 07:20:00 1987
Date-Received: Sat, 11-Jul-87 01:28:20 EDT
References: <4713@utah-cs.UUCP>
Lines: 21
Nf-ID: #R:utah-cs:-471300:qtecmuc:19400009:000:588
Nf-From: qtecmuc!ger    Jul  6 12:20:00 1987



Indeed, you don't need sizeof(STRUCTURE) to increment the pointer
to the next or any other structure.
Just saying:

next+=n;

sets the pointer to the n'th next structure.
This is because every pointer+integer operation always adds
integer*sizeof(pointer object) to the pointer, so you don't have to care
for the size of the object. This goes for pointer++ as well as for
foo=pointer+5.

next=this+sizeof(STRUCTURE)
will set the pointer sizeof(STRUCTURE) structures further, probably
to neverland.
I doubt, if this was your intention.

Gerhard Pehland
UUCP: ...!seismo!unido!qtecmuc!ger