新手:动态变量名称 [英] Newbie: Dynamic Variable Names

查看:91
本文介绍了新手:动态变量名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在visual basic 2005 express edition中为项目创建7段显示。我有一个2维的布尔值,它存储特定显示的每个段的值。我为第一个显示器编写了一个case语句,并希望将其用于其他显示,而不必复制代码。我已经尝试了所有我能想到的但却无法传递布尔数组的名称,我试图将值设置为从我的主代码到程序。这是我传递的代码:

Im trying to create a 7 segment display for a project in visual basic 2005 express edition. I have a 2 dimentional boolean which stores the values of each of the segments for a certain display. I have written a case statement for the first display and would like to use it for the other displays instead of having to copy the code. I have tried everything I can think of but can''t get it to pass the name of the boolean array im trying to set the values to from my main code to the procedure. Here is the code im passing:

展开 | 选择 | Wrap | 行号

推荐答案


...
...
展开 | 选择 | Wrap | 行号


谢谢,效果很好。我有另一个问题,目前我必须按照以下方式声明每个段的值以引用数组:
Thanks that worked great. I have another question, at the moment I have to declare the values of each of my segments in reference to the array in the follow way:
展开 | 选择 | 换行 | 行号



...

我希望将此更改为更像

...
I was hoping to change this to something more like

展开 | 选择 | Wrap | 行号


这篇关于新手:动态变量名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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