Define enum value at compile time via compiler argument?

aliak something at something.com
Mon Dec 25 17:46:05 UTC 2017


On Monday, 25 December 2017 at 16:38:32 UTC, Thomas Mader wrote:
> On Monday, 25 December 2017 at 16:22:11 UTC, Mengu wrote:
>> is it a relative path? if so:
>>
>>     pragma(msg, 
>> __FILE_FULL_PATH__.split("/")[0..$-1].join("/"));
>>
>>
>> https://run.dlang.io/is/gRUAD6
>
> Nice idea but it is an absolute path. :-/

Can you use the -J compiler flag to define a string import file?
Then you can:
string data = import("file.txt");




More information about the Digitalmars-d-learn mailing list