Define enum value at compile time via compiler argument?
Thomas Mader
thomas.mader at gmail.com
Mon Dec 25 18:05:43 UTC 2017
On Monday, 25 December 2017 at 17:46:05 UTC, aliak wrote:
> 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");
A little complicated but it works.
Thank you guys for your help.
More information about the Digitalmars-d-learn
mailing list