On Saturday, 8 December 2018 at 03:30:30 UTC, Jonathan M Davis
wrote:
There's one main per program, not per module. Where main lives
depends on how the program was written, but dub encourages
putting it in app.d, because that's what it generates when you
create a new dub project. imports then
On Friday, December 7, 2018 2:42:33 PM MST Samir via Digitalmars-d-learn
wrote:
> Ok. Upon further investigation, I think I see what is going on.
> Most of the repos I am skimming are for this year's Advent of
> Code. They structure their repo with an `app.d` file which does
> contain a `main`
Ok. Upon further investigation, I think I see what is going on.
Most of the repos I am skimming are for this year's Advent of
Code. They structure their repo with an `app.d` file which does
contain a `main` function but this program is structured such
that it imports the files I was looking
On Friday, December 7, 2018 2:02:59 PM MST Samir via Digitalmars-d-learn
wrote:
> Is it possible to write and execute a D program without a main
> function?
>
> Most of my programs will start with some `import` statements,
> followed by any functions and then ending with the `main`
> function
There is always a main function.
It doesn't matter in which module its in or language.
It just has to exist.
Is it possible to write and execute a D program without a main
function?
Most of my programs will start with some `import` statements,
followed by any functions and then ending with the `main`
function (e.g. `void main() {`).
As I am just a beginner to programming and still new to D, I have