How to include??
Bill Baxter
dnewsgroup at billbaxter.com
Thu Oct 18 20:27:11 PDT 2007
Ary Manzana wrote:
> The problem is that in a module, class or struct scope (and the rest
> where imports are now allowed) you can just put any declaration you
> want. This is not the case in a function. For example, you can't declare
> a template inside a function.
>
> Humm... And I'm out of examples. Are templates the only declarations not
> allwed in a function? Because otherwise, I think it would be possible to
> import inside a function or unittest...
I just noticed the other day that you can't declare overloaded functions
inside a function.
eg:
void foo()
{
void blarf(int x) { }
void blarf(string x) {}
blarf(3);
blarf("hi there");
}
--bb
More information about the Digitalmars-d-learn
mailing list