Set global immutables from main/getopt?

Steven Schveighoffer schveiguy at yahoo.com
Tue Jan 28 10:50:04 PST 2014


On Tue, 28 Jan 2014 13:41:24 -0500, Stanislav Blinov  
<stanislav.blinov at gmail.com> wrote:

> On Tuesday, 28 January 2014 at 18:30:37 UTC, Steven Schveighoffer wrote:
>> On Tue, 28 Jan 2014 12:27:02 -0500, Stanislav Blinov  
>> <stanislav.blinov at gmail.com> wrote:
>>>
>>> http://dpaste.dzfl.pl/620e8c61
>>
>> That being said, it *could* be done, since the runtime has access to  
>> the command line args. But the runtime would have to provide access to  
>> those parameters. But you'd have to do it in a static constructor.
>>
>
> Ahem. There was a link to dpaste :D

Oops! I glossed over that :) I thought the example just showed how a  
static constructor was required to initialize, I didn't see the access to  
the program args.

-Steve


More information about the Digitalmars-d-learn mailing list