Global variables read at compile time?
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 6 09:55:10 PDT 2014
On 05/06/2014 07:40 AM, Suliman wrote:
> Thanks! But is there any other solution? I am thinking that I am trying
> to specify config name by wrong way...
Sorry, I don't understand what exactly you are trying to do. :( Is
config file a compile-time concept? Do you want to read it at compile time?
You can also include the contents of a file at compile-time:
import ("somefile.d")
The compiler will read the file and insert its contents where the import
statement appears.
On the other hand, if it is available only at run-time, you obviously
have to read it at run time.
Ali
More information about the Digitalmars-d-learn
mailing list