forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinclude.xml
More file actions
74 lines (57 loc) · 2.26 KB
/
Copy pathinclude.xml
File metadata and controls
74 lines (57 loc) · 2.26 KB
1
<doc> <legacy_id></legacy_id> <name>include</name> <type>command</type> <syntax> <example>include p<i>ath</i></example> </syntax> <synonyms> </synonyms> <summary>The <b>include</b> command executes the given script in the context of the global environment.</summary> <examples><example>include "includes/foo.lc"</example><example>include "/home/mark/www/scripts/foo.lc"</example> </examples> <history> <introduced version="4.6.3">Introduced</introduced> <deprecated version=""></deprecated> <removed version=""></removed> </history> <objects> </objects> <platforms> <mac/> <windows/> <linux/> </platforms> <classes> <server/> </classes> <security> </security> <classification> </classification> <references> </references> <description> <overview>Use the <b>include</b> command to load script contained in other files.<p></p><p><b>Include</b> is only available when running in CGI mode (Server).</p></overview> <parameters> <parameter> <name>path</name> <description>The path to the file containing the script to include. .</description> <options title=""> <option> <item>absolute</item> <description>An absolute path to the file. For example "/home/user/www/scripts/foo.lc".</description> </option> <option> <item>relative</item> <description>A relative path to the file. Relative paths are resolved relative to the current folder. For example "includes/foo.lc" where folder 'includes' is in the current folder.</description> </option> </options> </parameter> </parameters> <value></value> <comments><note>LiveCode server scripts do not require specific file extensions. Common extensions used include ".irev" and ".lc". <p></note><p></p><note>Upon <b>include</b> a script is loaded into memory and parsed. Any variables and handler definitions are added to the global (script) environment. Then, each command/function is executed in order as it was encountered in the file.</note><p></p><p></p><note>The behavior of the include command is identical regardless of where it is run from - e.g. if it is run from a handler in a stack, it only affect the global script environment (home stack).</note></comments> </description></doc>