Thread overview | |||||
---|---|---|---|---|---|
|
October 17, 2018 Access program args outside of main | ||||
---|---|---|---|---|
| ||||
Hello, Is there a way to access command line arguments outside of main? // main.d module main; import data; void main(string args[]) { } // data.d module data immutable programData; static this() { // read in data } Ideally, I'd check args before I take the time to load up data. Thanks, Jordan |
October 17, 2018 Re: Access program args outside of main | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jordan Wilson | On Wednesday, 17 October 2018 at 22:30:31 UTC, Jordan Wilson wrote: > Ideally, I'd check args before I take the time to load up data. https://dlang.org/phobos/core_runtime.html#.Runtime |
October 18, 2018 Re: Access program args outside of main | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stanislav Blinov | On Wednesday, 17 October 2018 at 22:37:53 UTC, Stanislav Blinov wrote:
> On Wednesday, 17 October 2018 at 22:30:31 UTC, Jordan Wilson wrote:
>
>> Ideally, I'd check args before I take the time to load up data.
>
>
> https://dlang.org/phobos/core_runtime.html#.Runtime
Here I was looking through std...thanks mate.
Jordan
|
Copyright © 1999-2021 by the D Language Foundation