#INCLUDE

#INCLUDE "F"

INCLUDES THE FILE F INTO THE CODE

  • Type: Directive
  • Parameter: 1
  • Group: Directives

ACTION

The directive #INCLUDE "F" includes the source file F at the current place in the code. The line is then replaced in the code by the content of the file F.

The directive #INCLUDE "F" must be on only one line of the code.

The 3 following lines are not possible:

statement:#include "source.bas":statement

statement:#include "source.bas"

#include "source.bas":statement

The directive #INCLUDE "F" is executed by the editor before the code execution. As a consequence, F must be written literally because no evaluation is processed with the name.

For example, #include "source"+".bas" is not possible.

The file name must be literally written: #include "source.bas"

SYNTAX: #INCLUDE "F"

  • F = file name to be included

USE

  • The directive #INCLUDE is used to include a source file into the code .

ERROR

  • None.

EXAMPLE

rem includes a source file

#include "source.bas"

SEE ALSO

-