I want to know how source file trees are organized in Pascal.
From the Language Reference Guide from FPC, it seems that programs and units must be entirely contained in single files (unless the ${INCLUDE}
directive is used).
I can think of several ways of organizing my programs:
${INCLUDE}
Using ${INCLUDE}
at all seems like a bit of a hack to me, since a proper module system should make it unnecessary. On the other hand, I'm afraid that single-file modules would get
big enough to be unwieldy.
How is this usually done in actual projects? Is there some option I have missed?
If you design your application properly then each UNIT should be a reasonable size and have a single well-defined purpose. Dependencies should be somewhat hierarchical and you can always group any number of closely related UNITs into a library if your application is large enough to warrant it.