中国DOS联盟论坛

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-08-09 03:26
47,811 topics / 349,895 posts / today 0 new / 48,253 members
DOS批处理 & 脚本技术(批处理室) » [Help] Question about dynamic environment variables
Printable Version  746 / 2
Floor1 pusofalse Posted 2008-06-09 01:55
银牌会员 Posts 646 Credits 1,604
When I was bored, I tested a short piece of code. Like this...



Changing time to random gives the same result. Aren't system variables like these all dynamically calculated in real time~? Why is it that after assigning a value manually, it no longer changes in real time?
Floor2 knoppix7 Posted 2008-06-18 18:08
银牌会员 Posts 634 Credits 1,287 From cmd.exe
In the set /? help there is:

If the user explicitly defines a variable with one of these names, then
that definition will override the dynamic one described below:
Floor3 HAT Posted 2008-06-18 21:51
版主 Posts 5,017 Credits 9,023
If you've learned C, it should be fairly easy to understand. You can think of it as a local variable overriding a global variable.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023