home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1991
/
15
/
mkloop.bat
< prev
next >
Wrap
DOS Batch File
|
1991-07-30
|
1KB
|
52 lines
%@%echo off
:
: <<<<< mkloop.bat >>>>>
:
echo [example-1] (9 times loop)
:
set c1=
:loop1
set c1=%c1%-
:
: *loop body*
echo *%c1%*
:
if not "%c1%"=="---------" %then% goto loop1
%else% set c1=
:
echo [example-2] (39 times loop)
:
set c2=| set c1=
:loop2
set c1=%c1%-
:
: *loop body*
echo *%c2%* *%c1%*
:
if "%c2%%c1%"=="+++---------" %then% goto exit2
%else% if not "%c1%"=="----------" %then% goto loop2
%else% set c2=%c2%+| set c1=
goto loop2
:exit2
set c3=| set c2=| set c1=
echo [example-3] (119 times loop)
:
set c3=| set c2=| set c1=
:loop3
set c1=%c1%-
:
: *loop body*
echo *%c3%* *%c2%* *%c1%*
:
if "%c3%%c2%%c1%"=="/+---------" %then% goto exit3
%else% if not "%c1%"=="----------" %then% goto loop3
%else% set c2=%c2%+| set c1=
if not "%c2%"=="++++++++++" %then% goto loop3
%else% set c3=%c3%/| set c2=
goto loop3
:exit3
set c3=| set c2=| set c1=
echo *done*
quit