Re: [sv-bc] Namespace issue w. struct/union member names?


Subject: Re: [sv-bc] Namespace issue w. struct/union member names?
From: Steven Sharp (sharp@cadence.com)
Date: Wed Oct 29 2003 - 14:25:36 PST


>- Can we have a struct member called 'x' in the same scope as
> something else named 'x' (say, a variable)?
>[Arturo] Yes.

Actually, if you consider a struct to be a scope, then this isn't
possible. You can't declare a variable inside a struct, you can
only declare struct members. And you can't declare two members
with the same name in the same struct (i.e. scope).

But you could declare a variable named x in the same scope as a
struct which had a member named x inside it.

This may have been clear already, but I wanted to avoid confusion.

Steven Sharp
sharp@cadence.com



This archive was generated by hypermail 2b28 : Wed Oct 29 2003 - 14:33:35 PST