使用concantenated字符串作为变量名称 [英] Use concantenated string as variable name

查看:96
本文介绍了使用concantenated字符串作为变量名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆参数:

InputParam1,InputParam2,InputParam3等...


我想循环遍历它们而不是写作每个代码都有代码,但是有一些问题让它正常工作。


这是我到目前为止:

I have a bunch of params:
InputParam1, InputParam2, InputParam3, etc...

I would like to loop through them instead of writing out code for each one, but am having some issues getting it to work correctly.

Here is what I have so far:

展开 | 选择 | Wrap | 行号

推荐答案


我有一堆参数:

InputParam1,InputParam2 ,InputParam3等...


我想循环通过它们而不是o f为每个代码编写代码,但是在使它正常工作时遇到了一些问题。


这是我到目前为止所做的:
I have a bunch of params:
InputParam1, InputParam2, InputParam3, etc...

I would like to loop through them instead of writing out code for each one, but am having some issues getting it to work correctly.

Here is what I have so far:
展开 < span class =codeDivider> | 选择 | Wrap | Line数字


很遗憾,VB6和我不是原来的程序员。这些值被传递给一个设置存储过程的函数....


初始函数看起来像这样:
It is unfortunately VB6 and I am not the original programmer. The values are being passed to a function that sets up a stored procedure....

The initial function looks something like this:
展开 | 选择 | Wrap | 行号


在Public Function RunSP ...上换行,任何一个InputParams都有一个类型吗?


例如:InputParam1 As String

OR InputParam1 As Long

通常,某种形式的类型被分配给函数中的每个参数。如果没有,那肯定会让确定哪些类型的变量应该作为参数发送到函数更加困难。

我们需要好好看一下函数的其余部分以便更好地了解它的工作原理。
On the "Public Function RunSP..." line, do any of the InputParams have a type after them?

For example: InputParam1 As String
OR InputParam1 As Long

Usually there is some form of type that is assigned to each parameter in a function. If there isn''t, it certainly makes it more difficult to determine which types of variables should be sent to the function as parameters.
We would need to get a good look at the rest of the function to get a better understanding of how it works.


这篇关于使用concantenated字符串作为变量名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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