Include a file: Difference between revisions
Content added Content deleted
Line 1,969: | Line 1,969: | ||
And you can use the require statement, with the safe _once method: |
And you can use the require statement, with the safe _once method: |
||
<lang PHP>require_once("file.php")</lang> |
<lang PHP>require_once("file.php")</lang> |
||
=={{header|Picat}}== |
|||
===cl/1=== |
|||
<code>cl/1</code> compiles a Picat program to a byte code file (<code>.qi</code>) and load that. |
|||
<lang Picat>cl("include_file.pi")</lang> |
|||
The extension (<code>.pi</code>) can be omitted: |
|||
<lang Picat>cl(include_file)</lang> |
|||
===load/1=== |
|||
<code>load/1</code> loads a byte code file. If the byte code files does not exist, the program is first compiled. |
|||
<lang Picat>load(include_file)</lang> |
|||
===import=== |
|||
A Picat module is loaded with <code>import module</code>, which must be placed before any other definitions in the program. |
|||
<lang Picat>import cp, util.</lang> |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |