Setting versions for imports

Jascha Wetzel firstname at mainia.de
Tue Oct 2 11:48:59 PDT 2007


div0 wrote:
> so you can't use a module as a config.h in that way
> 
> besides what's wrong with passing them on the commandline?

it is inconvenient for some applications. the specs actually give such 
an example:

version (ProfessionalEdition)
{
     version = FeatureA;
     version = FeatureB;
     version = FeatureC;
}
version (HomeEdition)
{
     version = FeatureA;
}

you wouldn't want to specify that on the command line, and you wouldn't 
want to duplicate that in each module that needs the distinction.

> If you really want to go that way, you could use static if's to achieve 
> something similar I guess.

that does work for config imports, but not for the example where the 
version of a module shall be set by the importing module.


More information about the Digitalmars-d-learn mailing list