静态变量(Static Variable)在计算机编程领域指在程序执行前系统就为之静态分配(也即在运行时中不再改变分配情况)存储空间的一类变量。与之相对应的是在运行时只暂时存在的自动变量(即局部变量)与以动态分配方式获取存储空间的一些对象,其中自动变量的存储空间在调用栈上分配与释放。
不可重入函数和静态变量。
涉及到两个静态变量:您上次检查时间的时间以及时间本身。
Two static variables are involved: the last time you checked for the time and the time itself.
在每次启动执行组或部署消息流时,静态变量将恢复为其缺省值。
Static variables will return to their defaults every time the execution group is started or the message flow is deployed.
应用推荐