imports in a Separate File?

Ron Tarrant rontarrant at gmail.com
Tue Dec 11 15:27:35 UTC 2018


I ran across a code example 
(https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestWindow.d) in which the first ~120 lines are mostly import statements.

And it got me wondering...

I tried to off-load a bunch of imports into a pseudo-header file 
— importedStuff.d — and then in the actual code file I just did:

import importedStuff;

but found myself swimming in undefined identifier errors.

Is there a way to do this so I wouldn't have to scroll 120 lines 
into a file before finding code? Or does this mean I still 
haven't caught onto what I was told the last time I was on this 
forum?

(And here's a grammar question, just for the heck of it: Why 
isn't forum spelled with an 'n,' like column?)



More information about the Digitalmars-d-learn mailing list