SPUG: C question ;)
Yitzchak Scott-Thoennes
sthoenna at efn.org
Mon Mar 11 00:53:37 CST 2002
In article <20020310212822.A54051 at sabami.seaslug.org>,
Scott Blachowicz <scott at mail.dsab.rresearch.com> wrote:
> /* All of these should be equivalent (unless I'm remembering wrong). */
> (ptr+499)->a = 0;
> (*(ptr+499)).a = 0;
> ptr[499].a = 0;
> 499[ptr].a = 0; /* !! */
Last one only works if sizeof *ptr == 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
More information about the spug-list
mailing list