blob: bdca53edde695bdbada4c5d38021d793e8d8e770 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
@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 !
|