Re: static variable A cannot be read at compile time

2019-06-12 Thread Machine Code via Digitalmars-d-learn
On Wednesday, 12 June 2019 at 14:09:08 UTC, Newbie2019 wrote: On Wednesday, 12 June 2019 at 13:53:09 UTC, H. S. Teoh wrote: On Wed, Jun 12, 2019 at 01:12:58PM +, Newbie2019 via Digitalmars-d-learn wrote: Read: https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time T Thanks

Re: static variable A cannot be read at compile time

2019-06-12 Thread Newbie2019 via Digitalmars-d-learn
On Wednesday, 12 June 2019 at 13:53:09 UTC, H. S. Teoh wrote: On Wed, Jun 12, 2019 at 01:12:58PM +, Newbie2019 via Digitalmars-d-learn wrote: Read: https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time T Thanks for the tips. I move the static array into local var then it

Re: static variable A cannot be read at compile time

2019-06-12 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jun 12, 2019 at 01:12:58PM +, Newbie2019 via Digitalmars-d-learn wrote: > https://run.dlang.io/is/s4cfiv > > onlineapp.d(23): Error: static variable A cannot be read at compile time > onlineapp.d(23): Error: cannot implicitly convert expression 1 of type int > to int

static variable A cannot be read at compile time

2019-06-12 Thread Newbie2019 via Digitalmars-d-learn
https://run.dlang.io/is/s4cfiv onlineapp.d(23): Error: static variable A cannot be read at compile time onlineapp.d(23): Error: cannot implicitly convert expression 1 of type int to int* I see no reason the code should not work, and the second error message make no sense. please