Re: Initialising global associative array

2015-06-06 Thread Paul via Digitalmars-d-learn
On Saturday, 6 June 2015 at 20:39:14 UTC, anonymous wrote: On Saturday, 6 June 2015 at 20:30:50 UTC, Paul wrote: However, I now get an 'undefined identifier' error when compiling and trying to access the AA from a function within the same module. static this() { string[string] tagWords = [

Re: Initialising global associative array

2015-06-06 Thread anonymous via Digitalmars-d-learn
On Saturday, 6 June 2015 at 20:30:50 UTC, Paul wrote: However, I now get an 'undefined identifier' error when compiling and trying to access the AA from a function within the same module. static this() { string[string] tagWords = [ "DIST" : "Distance", . } ... if(tag in tagWords)

Re: Initialising global associative array

2015-06-06 Thread Paul via Digitalmars-d-learn
On Saturday, 6 June 2015 at 19:07:58 UTC, Jonathan M Davis wrote: On Saturday, June 06, 2015 18:18:07 Paul via Digitalmars-d-learn wrote: I need a globally accessible AA of type string[string] and find that it won't compile unless I use the static this(){} method as described in this thread:

Re: Initialising global associative array

2015-06-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, June 06, 2015 18:18:07 Paul via Digitalmars-d-learn wrote: > I need a globally accessible AA of type string[string] and find > that it won't compile unless I use the static this(){} method as > described in this thread: > > http://forum.dlang.org/thread/owhfdwrpfuiehzpiu...@forum.dlang

Re: Initialising global associative array

2015-06-06 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-06-06 20:18, Paul wrote: I need a globally accessible AA of type string[string] and find that it won't compile unless I use the static this(){} method as described in this thread: http://forum.dlang.org/thread/owhfdwrpfuiehzpiu...@forum.dlang.org#post-mailman.1522.1346449072.31962.digita

Initialising global associative array

2015-06-06 Thread Paul via Digitalmars-d-learn
I need a globally accessible AA of type string[string] and find that it won't compile unless I use the static this(){} method as described in this thread: http://forum.dlang.org/thread/owhfdwrpfuiehzpiu...@forum.dlang.org#post-mailman.1522.1346449072.31962.digitalmars-d-learn:40puremagic.com I