SecondBASIC Documentation v3

Home / Command Reference / $Include


Description: Similar to Import, $Include includes a source code file to your project. The code is inserted where the $Include command is located in your project.


$Include <SourceFile> [,<FileType>]

Part Description
<SourceFile> Required. <SourceFile> must be a valid path\filename. If you have previously saved the current project and the file to be included is in the project folder, you can start the <SourceFile> with a leading slash to indicate the projects root folder.
<FileType> Optional. <FileType> tells the compiler what kind of file to include. Valid options are @SBS and @ASM.If omitted, the compiler will assume the @SBS option and treat the file as a SecondBASIC source code file. If @ASM is used, the parser includes the file exactly as is.


    Print "Include Hello World example..."
    $Include "c:\secondbasic\examples\"