Include a file: Difference between revisions
Content added Content deleted
(Added example) |
|||
Line 1,151: | Line 1,151: | ||
<script id="Connections" language="VBScript" src="D:\include\ConnectionStrings.vbs"/> |
<script id="Connections" language="VBScript" src="D:\include\ConnectionStrings.vbs"/> |
||
</lang> |
</lang> |
||
=={{header|Verbexx}}== |
|||
<lang verbexx>/******************************************************************************* |
|||
* /# @INCLUDE file:"filename.filetype" |
|||
* - file: is just the filename |
|||
* - actual full pathname is VERBEXX_INCLUDE_PATH\filename.filetype |
|||
* where VERBEXX_INCLUDE_PATH is the contents of an environment variable |
|||
* |
|||
* /# @INCLUDE file:"E:\xxx\xxx\xxx\filename.filetype" |
|||
* - file: specifies the complete pathname of file to include |
|||
* |
|||
* @INCLUDE verb can appear only in pre-processor code (after /# /{ etc.) |
|||
*******************************************************************************/ |
|||
/{ //////////////////////////////////////////////// start of pre-processor code |
|||
@IF (@IS_VAR include_counter) |
|||
else:{@VAR include_counter global: = 0}; // global, so all code sees it |
|||
include_counter++; |
|||
@SAY " In pre-processor -- include counter = " include_counter; |
|||
@IF (include_counter < 3) |
|||
then:{@INCLUDE file:"rosetta\include_a_file.txt"}; // include self |
|||
}/ ////////////////////////////////////////////////// end of pre-processor code |
|||
@SAY "Not in pre-processor -- include_counter = " include_counter; |
|||
/] |
|||
Output: In preprocessor -- include_counter = 1 |
|||
In preprocessor -- include_counter = 2 |
|||
In preprocessor -- include_counter = 3 |
|||
Not in preprocessor -- include_counter = 3 |
|||
Not in preprocessor -- include_counter = 3 |
|||
Not in preprocessor -- include_counter = 3</lang> |
|||
=={{header|x86 Assembly}}== |
=={{header|x86 Assembly}}== |