Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 47 Posts 16 Joined 2007-04-02 09:47 19-year member UID 83710 Gender Male
Status Offline
I’ve never really understood what variable localization is! Yet in some friends’ works I often see it appear. I also couldn’t find any materials about it on the forum, so I’d like to ask all the experts: what does variable localization mean, and what is it used for? Is it like the difference between local variables and global variables in high-level languages?
[ Last edited by myth126 on 2007-4-13 at 08:40 PM ]
Credits 11,386 Posts 4,938 Joined 2006-07-23 17:10 20-year member UID 59080
Status Offline
It can be understood as a local variable. When the batch file finishes running, the variable is gone too, and the memory space allocated for it is also released; this is different from system variables (which can be understood as global variables).