@echo off
:loop
if "%1"==""goto done
prompt $e[%1m
echo on
echo off
prompt[$p]
cls
@echo off
rem set the named parameters textatter foregrounod
rem and background
if "%1"=="0" set textattr=0
if "%1"=="1" set textattr=1
if "%1"=="2" set textattr=2
if "%1"=="3" set textattr=3
if "%1"=="4" set textattr=4
if "%1"=="5" set textattr=5
if "%1"=="6" set textattr=6
if "%1"=="7" set textattr=7
if "%1"=="8" set textattr=8
if "%1"=="30" set foreground=30
if "%1"=="31" set foreground=31
if "%1"=="32" set foreground=32
if "%1"=="33" set foreground=33
if "%1"=="34" set foreground=34
if "%1"=="35" set foreground=35
if "%1"=="36" set foreground=36
if "%1"=="37" set foreground=37
if "%1"=="40" set background=40
if "%1"=="41" set background=41
if "%1"=="42" set background=42
if "%1"=="43" set background=43
if "%1"=="44" set background=44
if "%1"=="45" set background=45
if "%1"=="46" set background=46
if "%1"=="47" set background=47
if "%1"=="48" set background=48
if "%1"=="49" set background=49
shift
goto loop
:done
请帮助解释此程序!!
尤其是:
echo on
echo off
shift
在此程序中的作用
:loop
if "%1"==""goto done
prompt $e[%1m
echo on
echo off
prompt[$p]
cls
@echo off
rem set the named parameters textatter foregrounod
rem and background
if "%1"=="0" set textattr=0
if "%1"=="1" set textattr=1
if "%1"=="2" set textattr=2
if "%1"=="3" set textattr=3
if "%1"=="4" set textattr=4
if "%1"=="5" set textattr=5
if "%1"=="6" set textattr=6
if "%1"=="7" set textattr=7
if "%1"=="8" set textattr=8
if "%1"=="30" set foreground=30
if "%1"=="31" set foreground=31
if "%1"=="32" set foreground=32
if "%1"=="33" set foreground=33
if "%1"=="34" set foreground=34
if "%1"=="35" set foreground=35
if "%1"=="36" set foreground=36
if "%1"=="37" set foreground=37
if "%1"=="40" set background=40
if "%1"=="41" set background=41
if "%1"=="42" set background=42
if "%1"=="43" set background=43
if "%1"=="44" set background=44
if "%1"=="45" set background=45
if "%1"=="46" set background=46
if "%1"=="47" set background=47
if "%1"=="48" set background=48
if "%1"=="49" set background=49
shift
goto loop
:done
请帮助解释此程序!!
尤其是:
echo on
echo off
shift
在此程序中的作用
