:: Seterror.bat - First version
:: 这是我的第一个算法,用单纯批处理实现,有很多限制
:: 只能设置0-9和255,其它值均作为“大值”被设置为10
@echo off
if == goto end
if == goto setzero
if == goto setmax
for %%a in (1 2 3 4 5 6 7 8 9) do if == goto set1to9
goto setbig
:setzero
echo exist> test.txt
find "exist" test.txt > nul
del test.txt
goto end
:set1to9
choice /c:123456789 /t:%1,1 /n > nul
goto end
:setbig
choice /c:123456789a /t:a,1 /n > nul
goto end
:setmax
choice /d /n > nul
goto end
:end