$INCLUDEONCE: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(Created page with "The '''$INCLUDEONCE''' metacommand, when placed in include files, prevents that the file's contents can be injected multiple time into a program. {{PageSyntax}} : $INCLUDEONCE {{PageDescription}} * This Metacommand can be placed everywhere in an include file, but must be the only thing in the line, hence no additional whitespace or comments. * If placed in the main program, $INCLUDEONCE does nothing and is simply ignored without error. {{PageAvailability}}...")
 
No edit summary
Line 1: Line 1:
The '''$INCLUDEONCE''' metacommand, when placed in include files, prevents that the file's contents can be injected multiple time into a program.  
The '''$INCLUDEONCE''' metacommand, when placed in include files, prevents that the file's contents can be injected multiple times into a program.  




Line 7: Line 7:


{{PageDescription}}
{{PageDescription}}
* This [[Metacommand]] can be placed everywhere in an include file, but must be the only thing in the line, hence no additional whitespace or comments.
* This [[metacommand]] does not require a comment ''[[Apostrophe|']]'' or [[REM]] before it.
* If placed in the main program, $INCLUDEONCE does nothing and is simply ignored without error.
* It can be placed everywhere in an include file, but must be the '''only''' thing in the line, hence no additional whitespace or comments.
* If placed in the main program, '''$INCLUDEONCE''' does nothing and is simply ignored without error.
* '''$INCLUDEONCE''' will not work if placed inside pre-compiler [[$IF]]..[[$ELSE]]...[[$END IF]] blocks.





Revision as of 13:43, 8 February 2024

The $INCLUDEONCE metacommand, when placed in include files, prevents that the file's contents can be injected multiple times into a program.


Syntax

$INCLUDEONCE


Description

  • This metacommand does not require a comment ' or REM before it.
  • It can be placed everywhere in an include file, but must be the only thing in the line, hence no additional whitespace or comments.
  • If placed in the main program, $INCLUDEONCE does nothing and is simply ignored without error.
  • $INCLUDEONCE will not work if placed inside pre-compiler $IF..$ELSE...$END IF blocks.


Availability


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link