Include a file: Difference between revisions

Add Clojure
(→‎{{header|Smalltalk}}: Added Standard ML (SML/NJ))
(Add Clojure)
Line 222:
The inclusion of other files is achieved via a preprocessor. The <code>#include</code> preprocessor directive tells the compiler to incorporate code from the included file. This is normally used near the top of a source file and is usually used to tell the compiler to include header files for the function libraries.
<lang clipper> #include "inkey.ch" </lang>
 
=={{header|Clojure}}==
Just as in Common Lisp:
<lang clojure>(load "path/to/file")</lang>
 
This would rarely be used for loading code though, since Clojure supports modularisation (like most modern languages) through [http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html namespaces] and code is typically located/loaded via related abstractions. It's probably more often used to load data or used for quick-and-dirty experiments in the [https://en.wikipedia.org/wiki/Read–eval–print_loop REPL].
 
=={{header|COBOL}}==
Anonymous user