@echo off
Setlocal enabledelayedexpansion
title TIME
:001
mode con cols=60 lines=20 & color e0
set hms=%time:~0,8% & echo !hms!
echo.
for /f "delims=: tokens=1" %%i in ("%hms%") do set /a hh=%%i+1 & echo !hh!
for /f "delims=: tokens=2" %%i in ("%hms%") do set /a mm=%%i+1 & echo !mm!
for /f "delims=: tokens=3" %%i in ("%hms%") do set /a ss=%%i+1 & echo !ss!
goto :001
对于以上这段代码为什么时间到8、9秒的时候代码set /a ss=%%i+1会出错?如何纠正?
Setlocal enabledelayedexpansion
title TIME
:001
mode con cols=60 lines=20 & color e0
set hms=%time:~0,8% & echo !hms!
echo.
for /f "delims=: tokens=1" %%i in ("%hms%") do set /a hh=%%i+1 & echo !hh!
for /f "delims=: tokens=2" %%i in ("%hms%") do set /a mm=%%i+1 & echo !mm!
for /f "delims=: tokens=3" %%i in ("%hms%") do set /a ss=%%i+1 & echo !ss!
goto :001
对于以上这段代码为什么时间到8、9秒的时候代码set /a ss=%%i+1会出错?如何纠正?