@echo off echo A simple demonstration of MNU program principles. rem This is the control batch with main loop of applications. rem Execute this batch and try. rem ............... default settings set FILE=noname set MNU=50 :menu rem ............... the MNU call mnu demo.mnu envir.bat rem ............... what is choosen ? if errorlevel 50 goto file if errorlevel 40 goto print if errorlevel 30 goto execute if errorlevel 20 goto compile if errorlevel 10 goto edit goto quit :edit echo RUN editor here with the file %FILE%.pas set MNU=20 goto menu :compile echo RUN compiler here to the file %FILE%.pas set MNU=30 rem if errorlevel 1 set MNU=10 (if not succesfull then return to Edit) goto menu :execute echo EXECUTE the file %FILE%.exe set MNU=10 goto menu :print echo RUN the convertor %FILE%.pas to %FILE%.lst echo PRINT the file %FILE%.lst set MNU=10 goto menu :file call envir.bat set MNU=10 goto menu :quit echo End of demonstration, bye !