Alias question ( 1.0 )
Walter Bright
newshound1 at digitalmars.com
Sun Apr 13 13:55:49 PDT 2008
Edward Diener wrote:
> I am trying to understand the difference between and alias type and an
> alias declaration.
An alias type works analogously to C's typedef. An alias declaration
gives an alternate name for any other name, like:
alias foo.bar baz;
is sort of equivalent to the C:
#define baz foo.bar
> Is the distinction such that if the next token after 'alias' is a type,
> then the alias always refers to the full type including that token
> before the final alias name, but if the next token after 'alias' is not
> a type then the alias always refers to the complete declaration before
> the final alias name ?
Right.
More information about the Digitalmars-d
mailing list