Navigation: thinBasic language > Script structure > Pre Parsing directives > #INCLUDEDIR |
|
Description
Instruct the interpreter to consider other and additional directories when searching for files to be included.
Syntax
#INCLUDEDIR "DirectoryPath"
Returns
None
Parameters
Remarks
The following meta variables are supported inside "DirectoryPath":
Name |
Meaning |
%APP_PATH% |
Insert thinBasic installation path |
%APP_SOURCEPATH% |
Insert current script path |
%APP_INCLUDEPATH% |
Insert thinBasic standard include path |
Meta variables are place holders that will be replaced with relevant values at script run-time.
More #INCLUDEDIR statement can be present in a script file.
When included files specified by #INCLUDE have no path at all, the following finding sequence will used:
1. | current script path |
2. | \thinBasic\Inc\ path |
3. | if still not found, the paths specified by #INCLUDEDIR in the sequence they have been specified in the script |
Restrictions
This directive is a pre parsing directive. It means all #INCLUDEDIR statements will be solved before starting script execution.
See also
Examples
#includedir ".\IncDir\" '---Relative to current script path
#includedir "%APP_PATH%\IncDir3\" '---Absolute using \thinBasic\ as root
#includedir "%APP_INCLUDEPATH%\IncDir2\" '---Absolute using \thinBasic\Inc\ as root
#includedir "%APP_SOURCEPATH%\IncDir3\" '---Absolute using current script path as root
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |