![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-23 02:02 |
47,812 topics / 349,917 posts / today 0 new / 48,273 members |
| DOS批处理 & 脚本技术(批处理室) » [Original] Detailed Explanation of Variable Delay (Recommended for Beginners) |
| Printable Version 27,240 / 111 |
| Floor16 namejm | Posted 2007-03-13 02:17 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
There are side effects. For example, it will discard the half-width exclamation mark in the variable value. Other side effects haven't been observed for the time being, and it remains to be discovered by you all.
|
|
| Floor17 willsion | Posted 2007-03-13 03:45 |
| 高级用户 Posts 312 Credits 793 | |
Originally posted by namejm at 2007-3-13 02:17 AM: Does it have a scope of action? If it is defined inside a for () loop, does it only work within the for () loop? If so, it can reduce some possible side effects. |
|
| Floor18 namejm | Posted 2007-03-13 06:53 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
The meaning of setlocal is to localize variables. When it encounters the first endlocal statement, it ends this localization process. So, if defined inside for (), if the endlocal statement is not added in the appropriate position, the setlocal enabledelayedexpansion statement will always take effect.
In addition, more than 32 levels of setlocal statements will generate the error "The maximum setlocal recursion level has been reached". And one of the means to solve this problem is to use the endlocal statement to end the variable localization process before executing the 33rd setlocal statement. |
|
| Floor19 userlzx | Posted 2007-03-13 15:28 |
| 新手上路 Posts 6 Credits 12 | |
|
It's very detailed. I kind of understand. Thank you~~~
|
|
| Floor20 hxmupdata | Posted 2007-03-14 21:58 |
| 初级用户 Posts 39 Credits 76 | |
|
LZ is very humorous, talked about a lot of things, and the moderator also supplemented a lot.........................
|
|
| Floor21 dglsy | Posted 2007-03-15 21:40 |
| 初级用户 Posts 20 Credits 39 | |
|
Thanks a lot! Thanks to the original poster
|
|
| Floor22 wei7120 | Posted 2007-03-16 00:19 |
| 新手上路 Posts 8 Credits 17 | |
|
Thanks
|
|
| Floor23 nforce1 | Posted 2007-03-16 23:20 |
| 初级用户 Posts 16 Credits 128 | |
|
Thanks for everyone's support. I just had time to stroll around here today. Hehe!
Special thanks to moderator namejm for guiding everyone. I also learned from it!! |
|
| Floor24 wxjlotus | Posted 2007-03-17 11:41 |
| 社区乞丐 Posts 14 Credits -54 From 重庆大学 | |
|
I finally figured it out today, haha! Thanks a lot!!!
|
|
| Floor25 cy123 | Posted 2007-03-18 09:44 |
| 初级用户 Posts 30 Credits 76 | |
| Floor26 Billunique | Posted 2007-03-22 11:36 |
| 中级用户 Posts 112 Credits 259 | |
|
Your expression is so clear, really admire it~ Learn, learn!
|
|
| Floor27 chenall | Posted 2007-03-22 13:10 |
| 银牌会员 Posts 469 Credits 1,276 From 福建泉州 | |
|
It's very good. I hope the original poster will write some similar articles to make it easier for newcomers to understand.
|
|
| Floor28 nforce1 | Posted 2007-03-24 01:23 |
| 初级用户 Posts 16 Credits 128 | |
Originally posted by chenall at 2007-3-22 12:10 AM: I also hope I can, but it's just that I have more heart than strength (don't get me wrong~~heh) Too busy! When I have time, I can only rest! In fact, there are many experts in the forum. You can benefit a lot by asking any of them casually! I will definitely write again when I have time! Actually, I'm also a noob!! Haha! |
|
| Floor29 swallow | Posted 2007-03-26 08:36 |
| 新手上路 Posts 5 Credits 10 | |
|
These past two days I've been worrying about the command setlocal EnableDelayedExpansion, but today I saw your post and suddenly saw the light, thanks a lot.
|
|
| Floor30 stornager | Posted 2007-03-31 04:16 |
| 中级用户 Posts 131 Credits 328 | |
|
Well done! Hope the thread starter posts more to let us newbies learn. (:)(:)
|
|
| Prev 1 2 3 4 5 … 8 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |