$Include

Last Modified: 12/31/2020

Includes a SecondBASIC source code file into your project. The code is inserted where the $Include command is used. The code inserted into your project using this command will be parsed by the IDE as if the code existed in your project.

Arguments

NameTypeRequiredDescription
Filename String Yes The path to SecondBASIC source file.

Example

Syntax: $Include <Filename>
    $Include "MyFile.bas"

Remarks

When using $Include, be sure to pay attention to variable names and scopes. If your routines require a global variable, you'll need to make sure that is set up either in the parent source, or in the included source.

If you're using any user defined sub routines or functions, it would be better to place those into their own source file and include that at the start of your program. The IDE generates a list of functions and sub routines first. In general, it's better to use the project manager to set up and use external files to avoid any conflicts that may arise.

See Also

$IncAsm, DataFile