<< Click to Display Table of Contents >> Navigation: ThinBASIC Core 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 |
%CSIDL_ADMINTOOLS %CSIDL_ALTSTARTUP %CSIDL_APPDATA %CSIDL_BITBUCKET %CSIDL_CDBURN_AREA %CSIDL_COMMON_ADMINTOOLS %CSIDL_COMMON_ALTSTARTUP %CSIDL_COMMON_APPDATA %CSIDL_COMMON_DESKTOPDIRECTORY %CSIDL_COMMON_DOCUMENTS %CSIDL_COMMON_FAVORITES %CSIDL_COMMON_MUSIC %CSIDL_COMMON_PICTURES %CSIDL_COMMON_PROGRAMS %CSIDL_COMMON_STARTMENU %CSIDL_COMMON_STARTUP %CSIDL_COMMON_TEMPLATES %CSIDL_COMMON_VIDEO %CSIDL_CONTROLS %CSIDL_COOKIES %CSIDL_DESKTOP %CSIDL_DESKTOPDIRECTORY %CSIDL_DRIVES %CSIDL_FAVORITES %CSIDL_FLAG_CREATE %CSIDL_FONTS %CSIDL_HISTORY %CSIDL_INTERNET %CSIDL_INTERNET_CACHE %CSIDL_LOCAL_APPDATA %CSIDL_MYDOCUMENTS %CSIDL_MYMUSIC %CSIDL_MYPICTURES %CSIDL_MYVIDEO %CSIDL_NETHOOD %CSIDL_NETWORK %CSIDL_PERSONAL %CSIDL_PRINTERS %CSIDL_PRINTHOOD %CSIDL_PROFILE %CSIDL_PROGRAM_FILES %CSIDL_PROGRAM_FILES_COMMON %CSIDL_PROGRAMS %CSIDL_RECENT %CSIDL_SENDTO %CSIDL_STARTMENU %CSIDL_STARTUP %CSIDL_SYSTEM %CSIDL_TEMPLATES %CSIDL_WINDOWS |
%CSIDL_* meta statements info: https://msdn.microsoft.com/it-it/library/windows/desktop/bb762494(v=vs.85).aspx
Those meta statements will be resolved using SHGetFolderLocation function |
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
#includedir "%CSIDL_LOCAL_APPDATA\Project1\Includes\" '---