Re: Error: getenv cannot be interpreted at compile time

2015-02-17 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Feb 17, 2015 at 07:56:19PM +, Paul via Digitalmars-d-learn wrote: [...] > I see, thanks once again :D I don't know why the environment variable isn't > accessible at compilation (from a terminal) but that's OS business I guess > rather than D related. Even if you *could* access it at c

Re: Error: getenv cannot be interpreted at compile time

2015-02-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 17 February 2015 at 20:06:15 UTC, Paul wrote: There doesn't seem to be an alternative to using a pointer as it's rather a large struct to pass to functions as is! yeah, copying is disabled too. The struct isn't big in memory terms (it has few actual data members) but since the dest

Re: Error: getenv cannot be interpreted at compile time

2015-02-17 Thread ketmar via Digitalmars-d-learn
On Tue, 17 Feb 2015 19:56:19 +, Paul wrote: > I see, thanks once again :D I don't know why the environment variable > isn't accessible at compilation (from a terminal) 'cause you can't execute C code in CTFE. signature.asc Description: PGP signature

Re: Error: getenv cannot be interpreted at compile time

2015-02-17 Thread Paul via Digitalmars-d-learn
) but when I define it like this in global scope: Terminal Screen = Terminal(ConsoleOutputType.cellular); I get this error: Error: getenv cannot be interpreted at compile time, because it has no available source code I don't understand the error and Google doesn't help - can it be

Re: Error: getenv cannot be interpreted at compile time

2015-02-17 Thread Paul via Digitalmars-d-learn
On Tuesday, 17 February 2015 at 19:29:52 UTC, Adam D. Ruppe wrote: On Tuesday, 17 February 2015 at 19:17:42 UTC, Paul wrote: I don't understand the error and Google doesn't help - can it be fixed or am I just using the wrong approach? Trying to create it as a global tries to make it as a stati

Re: Error: getenv cannot be interpreted at compile time

2015-02-17 Thread H. S. Teoh via Digitalmars-d-learn
> > Terminal Screen = Terminal(ConsoleOutputType.cellular); > > I get this error: > > Error: getenv cannot be interpreted at compile time, because it has no > available source code > > I don't understand the error and Google doesn't help - can it be fixed

Re: Error: getenv cannot be interpreted at compile time

2015-02-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 17 February 2015 at 19:17:42 UTC, Paul wrote: I don't understand the error and Google doesn't help - can it be fixed or am I just using the wrong approach? Trying to create it as a global tries to make it as a static variable which means it constructs at compile time. It can't acc

Error: getenv cannot be interpreted at compile time

2015-02-17 Thread Paul via Digitalmars-d-learn
annot be interpreted at compile time, because it has no available source code I don't understand the error and Google doesn't help - can it be fixed or am I just using the wrong approach? TIA Paul