Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
33
Task/Include-a-file/Verbexx/include-a-file.verbexx
Normal file
33
Task/Include-a-file/Verbexx/include-a-file.verbexx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*******************************************************************************
|
||||
* /# @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
|
||||
Loading…
Add table
Add a link
Reference in a new issue