Re: Is it possible to execute a function inside .d script that has no main function?

2019-07-12 Thread BoQsc via Digitalmars-d-learn
On Thursday, 11 July 2019 at 10:41:38 UTC, Alex wrote: On Thursday, 11 July 2019 at 09:43:55 UTC, BoQsc wrote: Here I have a file named: module.d [...] There is no main() function since, I want to import this module, into another .d file. ( If I try to import and module.d does have main()

Re: Is it possible to execute a function inside .d script that has no main function?

2019-07-11 Thread Alex via Digitalmars-d-learn
On Thursday, 11 July 2019 at 09:43:55 UTC, BoQsc wrote: Here I have a file named: module.d import std.stdio : writeln; void interestingFunction(){ writeln("Testing"); } There is no main() function since, I want to import this module, into another .d file. ( If I try to import an