Calling functions from other files/modules

Namal via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 6 14:06:32 PST 2016


Hello,

finally I want to learn how to do it right and I tried to 
understand it from here

https://en.wikibooks.org/wiki/D_(The_Programming_Language)/d2/Modules

But I have a few questions. Do I have always to include std.stdio 
in every file like in the example or is it enough just to import 
a module which has this already included?

Why do I need to define my main as the main module? I can't 
imagine that I can import it somewhere else.

Is there something like #pragma once that needs to be done?




More information about the Digitalmars-d-learn mailing list