cvs commit: hugs98/src errors.c script.c hugs98/src/winhugs General.c IORemap.c Winhugs.h

Neil Mitchell ndmitchell at gmail.com
Wed Oct 5 07:15:54 EDT 2005


>
> In C, p[n] is defined as *(p+n) (see [1] 6.5.2.1), with addition of
> pointers and integers defined as advancing the pointer by n array
> elements (6.5.6).  So
>
>         (p = &p[5])  ===  (p = &*(p+5))  ===  (p = p+5)  ===  (p += 5)
>
> whatever the value of sizeof(*p).
>
> [1] ISO/IEC 9899:1999 <http://www.nirvani.net/docs/ansi_c.pdf>,
>     but this part was there from the beginning.

You learn something new every day :)

Neil


More information about the Cvs-hugs mailing list