On Mon, 10 Dec 2018 17:58:32 +, aliak wrote:
> string parseConfig(string str) {
>string ret;
>foreach (line; str.split("\n")) {
> auto parts = line.split("=");
> ret ~= `string ` ~ parts[0] ~ ` = "` parts[2] `";`;
>}
>return ret;
> }
That works as long as none of the
On Monday, 10 December 2018 at 17:47:37 UTC, Neia Neutuladh wrote:
On Mon, 10 Dec 2018 11:08:23 +, Narxa wrote:
Hello, people!
I would like to have a constant with the value of some
environment variable that is defined at compile time.
In your build script, echo the environment variable
On Monday, 10 December 2018 at 11:08:23 UTC, Narxa wrote:
Hello, people!
I would like to have a constant with the value of some
environment variable that is defined at compile time.
In FreePascal, it can be done by defining it in source as:
VALUE_OF_SOMETHING = {$I %SOMETHING%};
And I can
On Mon, 10 Dec 2018 11:08:23 +, Narxa wrote:
> Hello, people!
>
> I would like to have a constant with the value of some environment
> variable that is defined at compile time.
In your build script, echo the environment variable into a file. Then
import() that file and use the value.
> I
Hello, people!
I would like to have a constant with the value of some
environment variable that is defined at compile time.
In FreePascal, it can be done by defining it in source as:
VALUE_OF_SOMETHING = {$I %SOMETHING%};
And I can call the compiler with (bash):
SOMETHING='Anything' export