🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c
Article #9635

Re: Must casting destroy lvalueness?

#9635
From: Stuart D. Gathman
Date: Tue, 21 Oct 1986 15:28
18 lines
1025 bytes
In article <4617@brl-smoke.ARPA>, NET-RELAY.ARPA>@brl-smoke.ARPA writes:
>                     For example, a useful and readable way to move a pointer 
> through a buffer containing a mixture of objects of different sizes is 

>                        ((OBJECT)pointer)++

A more correct syntax:

{
  char *pointer;
  /* . . . */
  pointer += sizeof (OBJECT);
  /* . . . */
}

And clearer to boot if you ask me.
-- 
Stuart D. Gathman	<..!seismo!{vrdxhq|dgis}!BMS-AT!stuart>
Technical Details
Message-ID: <252@BMS-AT.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!vrdxhq!BMS-AT!stuart
References: <4617@brl-smoke.ARPA>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!vrdxhq!BMS-AT!stuart
From: stuart@BMS-AT.UUCP (Stuart D. Gathman)
Newsgroups: net.lang.c
Subject: Re: Must casting destroy lvalueness?
Message-ID: <252@BMS-AT.UUCP>
Date: Tue, 21-Oct-86 11:28:58 EDT
Article-I.D.: BMS-AT.252
Posted: Tue Oct 21 11:28:58 1986
Date-Received: Wed, 22-Oct-86 22:59:01 EDT
References: <4617@brl-smoke.ARPA>
Organization: Business Management Systems, Inc., Fairfax, VA
Lines: 18
Summary: There is a right way.