INC
Description
Include another menu, style or setup file in the current file. 7 levels of include are possible.
This command can be used to reference a file containing styles and commands on the SDHC card so that it’s contents are included at that point in the command process.
This enables modular design of the menu system.

The system does not recognize directory structures in the SDHC card.
Please put all active files in the root. All file names are 8 characters maximum length.
Syntax/Parameters
INC(Source);
Options
Text variable - v39.00
INC command accepts text variable (or pointer to text variable) for file name.

Maximum line length - v49.02
Maximum line length increased from 512 bytes to 8K bytes for include files.

Menu File Replacement Macro INC(''SDHC/file.mnu?find1=repl1&find2=repl2&...''); - v49.46
* Implemented functionality to include search/replace in included "mnu" files.
* INC("SDHC/file.mnu?find1=repl1&find2=repl2&...");
* Code looks for $find1$ (case insensitive) and replaces with repl1 etc.

If test.mnu contains:
VAR(var$name1$1Txt,"",TXT);
VAR(var$name1$2Txt,"$val2$",TXT);
VAR(var$name1$3Txt,"$invalid1$",TXT);
VAR(var$NAME1$4Txt,"$invalid2",TXT);
PAGE(pg$NaMe1$Main,stPage)
{
POSN($x$,$y$); TEXT(txt$name1$1,var$name1$3Txt,stTxt);
POSN(+0,+32); TEXT(txt$name1$2,var$name1$4Txt,stTxt);
}

then INC("SDHC/test.mnu?name1=Alpha&val2=Beta&x=99&y=99"); creates:

VAR(varAlpha1Txt,"",TXT);
VAR(varAlpha2Txt,"Beta",TXT);
VAR(varAlpha3Txt,"$invalid1$",TXT);
VAR(varAlpha4Txt,"$invalid2",TXT);
PAGE(pgAlphaMain,stPage)
{
POSN(99,99); TEXT(txtAlpha1,varAlpha3Txt,stTxt);
POSN(+0,+32); TEXT(txtAlpha2,varAlpha4Txt,stTxt);
}

and calling it again with INC("SDHC/test.mnu?name1=Delta&val2=Hello&x=199&y=149"); creates:

VAR(varDelta1Txt,"",TXT);
VAR(varDelta2Txt,"Hello",TXT);
VAR(varDelta3Txt,"$invalid1$",TXT);
VAR(varDelta4Txt,"$invalid2",TXT);
PAGE(pgDeltaMain,stPage)
{
POSN(199,149); TEXT(txtDelta1,varDelta3Txt,stTxt);
POSN(+0,+32); TEXT(txtDelta2,varDelta4Txt,stTxt);
}
 
Example
INC( "SDHC/submenu.mnu" ); // specifies the file path on the SDcard.
INC( "NAND/menu2.mnu" ); // specifies the file path in the NAND.
INC( File1, File2, File3, ..., FileN ); // multiple files are possible