这段代码应如何解释,尤其是设计call的部分,搜索解释也没找到,最头疼的是程序中有的地方的%多的看的我晕头转向!
-
- @echo off
- set str=四四四四ABCDEFG1234567
- set "line= "
- set "sleep=ping 127.1 -n 2 >nul"
- echo.
- call :split 4 7 col
- call :split 11 7 col "cls&echo."
- call :split 0 4 line "cls"
- pause>nul
- goto :eof
-
- :split
- set /a _tmp1=%1+%2-1,count=0
-
- for /l %%a in (%1,1,%_tmp1%) do (
- set /a count+=1
- %~4
-
- if %~3 == col (
- call call set %3%%count%%=%%%%%3%%count%%%%%%%line%%%str:~%%a,1%%
- if %~1 == 4 (
- call :cout %%count%% %%count%% %~3
- ) else (
- call :cout 1 7 %~3
- )
- ) else (
- call set %3=%%%3%% %%str:~%%a,1%%
- call :cout 1 7 col "echo %%%3%%"
- )
-
- %sleep%
- )
- goto :eof
-
-
- :cout
- %~4
- for /l %%i in (%1,1,%2) do (
- call echo.%%%3%%i%%
- )
- goto :eof
-
-
-
-
-
-
-
-
-
-
-
-
复制代码
|