Pointer notation
Author Message
Pointer notation

Hello,

While maintaining a piece of software this morning I came across some
pointer notation I have never seen before, and I hope somebody can
help me out.  The segment in question is:

TMP is an array with index ie.
MASK is an array of constants.

Has anyone seen something like this before?

Thanks
KS

Sat, 03 Jul 2004 00:05:50 GMT
Pointer notation

Quote:

> While maintaining a piece of software this morning I came across some
> pointer notation I have never seen before,

No, you didn't :-).

Quote:

> TMP is an array with index ie.
> MASK is an array of constants.

> Has anyone seen something like this before?

Yes, but it is simpler than you think it is. Unary * binds more closely
than binary &, so this parses as:

That is, the pointer isn't bit-anded with the mask, the result of
dereferencing that pointer is. It would be equivalent to this:

Richard

Fri, 02 Jul 2004 23:36:54 GMT
Pointer notation

Quote:
>Hello,

>While maintaining a piece of software this morning I came across some
>pointer notation I have never seen before, and I hope somebody can
>help me out.  The segment in question is:

This expression bitwise ANDs the value stored in MASK[i] and the value
stored in TMP[ie] (aka *(TMP+ie) )

Quote:
>TMP is an array with index ie.
>MASK is an array of constants.

>Has anyone seen something like this before?

>Thanks
>KS

Lew Pitcher, Information Technology Consultant, Toronto Dominion Bank Financial Group

(Opinions expressed are my own, not my employer's.)

Sat, 03 Jul 2004 00:12:40 GMT
Pointer notation

Quote:
> Hello,

> While maintaining a piece of software this morning I came across some
> pointer notation I have never seen before, and I hope somebody can
> help me out.  The segment in question is:

Ah the power of spaces and array notation...

Where's the rest of the line? It would have helped.

--
- Mark A. Odell
- Embedded Firmware Design, Inc.
- http://www.embeddedfw.com

Sat, 03 Jul 2004 00:26:48 GMT
Pointer notation
sdfsdf
Quote:
> Hello,

> While maintaining a piece of software this morning I came across some
> pointer notation I have never seen before, and I hope somebody can help
> me out.  The segment in question is:

> TMP is an array with index ie.
> MASK is an array of constants.

> Has anyone seen something like this before?

> Thanks
> KS

Sat, 03 Jul 2004 15:43:38 GMT
Pointer notation

Quote:

> >Hello,

> >While maintaining a piece of software this morning I came across some
> >pointer notation I have never seen before, and I hope somebody can
> >help me out.  The segment in question is:

> This expression bitwise ANDs the value stored in MASK[i] and the value
> stored in TMP[ie] (aka *(TMP+ie) )

> >TMP is an array with index ie.
> >MASK is an array of constants.

> >Has anyone seen something like this before?

> >Thanks
> >KS

> Lew Pitcher, Information Technology Consultant, Toronto Dominion Bank Financial Group

> (Opinions expressed are my own, not my employer's.)

hei,i love your humor!i never thought a programmer has such
humor!though i learn for many times to be a humorous man but failed as
well as to be a programmer! in fact,i am a beginer.

Sat, 03 Jul 2004 21:32:04 GMT

 Page 1 of 1 [ 6 post ]

Relevant Pages