switch(string)
BCS
ao at pathlink.com
Wed Jun 18 14:44:53 PDT 2008
Reply to Nick,
> "Robert Fraser" <fraserofthenight at gmail.com> wrote in message
> news:g3al00$20ml$1 at digitalmars.com...
>
>> invariant string BAR1 = "bar1";
>>
>> If "string" isn't specified it will be deduced.
>>
> To clarify:
>
> invariant BAR1 = "bar1";
>
> Is shorthand for:
>
> invariant auto BAR1 = "bar1";
>
> And "auto" means the type is deduced.
>
Almost (the difference is almost irrelevant, I think), auto is a do-nothing
attribute that is used if no other attributes are used. The syntax for type
deduction is "<attributes> <name> = <exp>"
More information about the Digitalmars-d-learn
mailing list