Please see the following code (in a batch file):
-------------------------------------------
@echo off
FOR /L %%i in (1,1,3) do (
set /a T=%%
echo %T%)
pause>nul
--------------------------------------------
After the program runs, it does not appear as we predicted:
1
2
3
Instead:
ECHO is off.
........
What's going on and what's the solution?
──────────────── Moderation Record ────────────────
Performed by: namejm
Original title: Expert, come quickly for help
Current title: Why does the for loop only display the echo status?
Explanation: The original title was too vague, which was not conducive to forum search and management. After the moderator's prompt was issued three days ago, the original poster had not changed the title. Now I, on behalf of the helpless moderator, forcibly modified the title and deducted 4 points from the original poster (because the forum points rules have changed, and the punishment has been reduced appropriately).
──────────────── Moderation Record ────────────────
[ Last edited by namejm on 2006-10-19 at 01:09 ]
-------------------------------------------
@echo off
FOR /L %%i in (1,1,3) do (
set /a T=%%
echo %T%)
pause>nul
--------------------------------------------
After the program runs, it does not appear as we predicted:
1
2
3
Instead:
ECHO is off.
........
What's going on and what's the solution?
──────────────── Moderation Record ────────────────
Performed by: namejm
Original title: Expert, come quickly for help
Current title: Why does the for loop only display the echo status?
Explanation: The original title was too vague, which was not conducive to forum search and management. After the moderator's prompt was issued three days ago, the original poster had not changed the title. Now I, on behalf of the helpless moderator, forcibly modified the title and deducted 4 points from the original poster (because the forum points rules have changed, and the punishment has been reduced appropriately).
──────────────── Moderation Record ────────────────
[ Last edited by namejm on 2006-10-19 at 01:09 ]
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| namejm | -4 | 2006-10-19 01:10 |
