Jump to content

Compiler/Simple file inclusion pre processor: Difference between revisions

m
→‎{{header|Phix}}: duplicate includes
m (→‎{{header|Phix}}: no dynamic includes)
m (→‎{{header|Phix}}: duplicate includes)
Line 427:
<span style="color: #008080;">include</span> <span style="color: #008000;">"builtins\\complex.e"</span> <span style="color: #000080;font-style:italic;">-- ditto</span>
<!--</lang>-->
If the compiler detects that some file has already been included it does not do it again (from the same directory, two or more files of the same name ''can'' be included from different directories).
I should perhaps also state that include handling is part of normal compilation/interpretation, as opposed to a separate "preprocessing" step, and that each file is granted a new private scope, and while of course there is only one "global" scope, it will use the implicit include hierarchy to automatically resolve any clashes that might arise to the most appropriate one, aka "if it works standalone it should work exactly the same when included in as part of a larger application".
7,813

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.