全球变量不保留其价值。 [英] Global variables not retaining their value.

查看:94
本文介绍了全球变量不保留其价值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在表单模块中定义了公共变量。命令按钮的on click事件初始化这些变量。按键表单事件使用这些变量按顺序逐步执行数组但总是出现错误,看起来变量未初始化。

I have Public variables defined in the form module. An on click event for a command button initializes these variables. An on key press form event uses these variables to step sequentially through an array but there is always an error and it looks like the variables become uninitialized.

展开 | 选择 | Wrap | 行号

推荐答案


我在表单模块中定义了公共变量。命令按钮的on click事件初始化这些变量。按键表单事件使用这些变量按顺序逐步执行数组但总是出现错误,看起来变量未初始化。

I have Public variables defined in the form module. An on click event for a command button initializes these variables. An on key press form event uses these variables to step sequentially through an array but there is always an error and it looks like the variables become uninitialized.

展开 | 选择 | Wrap | 行号


我不认为这是阵列。两个整数变量也都是未初始化的。奇怪的是,这是它发生的唯一一次。我之前使用过全局变量,他们保留了自己的价值观。这次他们不是。
I don''t think it''s the array. Both the integer variables become uninitialized as well. The weird thing is that this is the only time it has happened. I''ve used global variables previously and they''ve kept their values. This time they don''t.


让我澄清一下。我的意思是我已经将全局变量用于不同的形式。我并不是说变量用来工作,现在他们不会。
Let me clarify. I meant that I have used global variables for a different form. I didn''t mean to say that the variables used to work and now they don''t.


这篇关于全球变量不保留其价值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆