问题变量 [英] Problem Variable

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

问题描述




任何人都可以告诉我如何创建一个变量

将连续列出数字然后在CASE中使用<一个精选案例中的



我需要它才能变通,因为它必须在一个包含

的页面中。它需要被ap的每个实例使用,并且

不同实例的数字会发生变化。


不能工作的例子
baddivisions = 100,200,300,400,500,600,700

baddivisions =(100,200,300,400,500,600,700)

baddivisions = 100& "," &安培; 200& "," &安培;等等


这个SNIPIT是我需要投入的地方:


做的时候不是Division.EOF

选择案件分部(DivNumber)

案例baddivisions< ----这适用于数字不是w /变量

donothing =" yes"

case else

Response.Write("< option>"& Division(" DivNumber")&"< / option>")

结束选择

Division.MoveNext

循环

Response.Write("< / select>< br> ;")


谢谢,

Fox

Hi,

Can anyone tell me how can I create a variable which
will list numbers in a row and then use it in a CASE
within a Select Case?

I need it in a varaible because it has to be in an include
page. It needs to be used by each instance of the ap and
the numbers will change for different instances.

examples that don''t work
baddivisions = 100,200,300,400,500,600,700
baddivisions = (100,200,300,400,500,600,700)
baddivisions = 100 & "," & 200 & "," & etc

THIS SNIPIT IS WHERE I NEED TO PUT IT:

Do while NOT Division.EOF
Select Case Division("DivNumber")
case baddivisions <---- this works w/ numbers not w/ variable
donothing = "yes"
case else
Response.Write("<option>" & Division("DivNumber") & "</option>")
END SELECT
Division.MoveNext
Loop
Response.Write ("</select><br>")

Thanks,
Fox

推荐答案



" Fox" < fox @ connexions .net>在消息中写道

新闻:OM ************* @ TK2MSFTNGP11.phx.gbl ...

"Fox" <fox @ connexions .net> wrote in message
news:OM*************@TK2MSFTNGP11.phx.gbl...


任何人都可以告诉我如何创建一个变量,它会连续列出数字然后在精选案例中的案例中使用它?

我需要它在变速器中,因为它必须在一个包含
页面。它需要被ap的每个实例使用,并且数字会针对不同的实例而改变。

不能工作的例子
baddivisions = 100,200,300,400,500,600,700
baddivisions =(100,200,300,400,500,600,700)
baddivisions = 100& "," &安培; 200& "," &安培;等等

这个SNIPIT是我需要投入的地方:

同时不是Division.EOF
选择案例部门(DivNumber)
case baddivisions< ----这个工作w /数字不w /变量
donothing =" yes"
case else
Response.Write("< option>"& ; Division(DivNumber)&"< / option>")
END SELECT
Division.MoveNext
循环
Response.Write("< / select>< br>")
Hi,

Can anyone tell me how can I create a variable which
will list numbers in a row and then use it in a CASE
within a Select Case?

I need it in a varaible because it has to be in an include
page. It needs to be used by each instance of the ap and
the numbers will change for different instances.

examples that don''t work
baddivisions = 100,200,300,400,500,600,700
baddivisions = (100,200,300,400,500,600,700)
baddivisions = 100 & "," & 200 & "," & etc

THIS SNIPIT IS WHERE I NEED TO PUT IT:

Do while NOT Division.EOF
Select Case Division("DivNumber")
case baddivisions <---- this works w/ numbers not w/ variable
donothing = "yes"
case else
Response.Write("<option>" & Division("DivNumber") & "</option>")
END SELECT
Division.MoveNext
Loop
Response.Write ("</select><br>")




不确定我明白你要做什么......你想要

匹配整个字符串?如:


分部(DivNumber)= 100,200,300,400,500,600,700


或者您是否尝试匹配值为其中一个值的值在那个

列表中?我假设后者。


''创建一个数组来保存值

baddivisions = Split(" 100,200,300,400,500,600,700",",")


Do While Not Division.EOF

''检查DivNumber与阵列

donothing =" no"

对于i = 0到Ubound(baddivisions)

如果Division(DivNumber)= CInt(baddivisions(i))那么

donothing ="是'

结束如果

下一页

如果donothing =" no"然后

Response.Write("< option>"& Division(" DivNumber")&"< / option>")

结束如果

Division.MoveNext

循环

希望这会有所帮助。

问候,

Peter Foti



Not sure I understand what you''re trying to do exactly... are you trying to
match against the entire string? As in:

Division("DivNumber") = 100,200,300,400,500,600,700

Or are you trying to match where the value is ONE OF the values in that
list? I assume the latter.

'' Create an array to hold the values
baddivisions = Split("100,200,300,400,500,600,700",",")

Do While Not Division.EOF
'' Check DivNumber against array
donothing = "no"
For i = 0 to Ubound(baddivisions)
If Division("DivNumber") = CInt(baddivisions(i)) Then
donothing = "yes"
End If
Next
If donothing = "no" Then
Response.Write("<option>" & Division("DivNumber") & "</option>")
End If
Division.MoveNext
Loop
Hope this helps.
Regards,
Peter Foti


什么应该产生真正的结果?如果Division(Number)=

" 100,200,300,400 ......或者如果分区(数字)只是

中的一个数字那个字符串?


Ray在工作中


" Fox" < fox @ connexions .net>在消息中写道

新闻:OM ************* @ TK2MSFTNGP11.phx.gbl ...
What should yield a true result? If Division("Number") =
"100,200,300,400..." or if Division("Number") is just ONE of the numbers in
that string?

Ray at work

"Fox" <fox @ connexions .net> wrote in message
news:OM*************@TK2MSFTNGP11.phx.gbl...


任何人都可以告诉我如何创建一个变量,它会连续列出数字然后在精选案例中的案例中使用它?

我需要它在变速器中,因为它必须在一个包含
页面。它需要被ap的每个实例使用,并且数字会针对不同的实例而改变。

不能工作的例子
baddivisions = 100,200,300,400,500,600,700
baddivisions =(100,200,300,400,500,600,700)
baddivisions = 100& "," &安培; 200& "," &安培;等等

这个SNIPIT是我需要投入的地方:

同时不是Division.EOF
选择案例部门(DivNumber)
case baddivisions< ----这个工作w /数字不w /变量
donothing =" yes"
case else
Response.Write("< option>"& ; Division(DivNumber)&"< / option>")
END SELECT
Division.MoveNext
循环
Response.Write("< / select>< br>")

谢谢,
Fox
Hi,

Can anyone tell me how can I create a variable which
will list numbers in a row and then use it in a CASE
within a Select Case?

I need it in a varaible because it has to be in an include
page. It needs to be used by each instance of the ap and
the numbers will change for different instances.

examples that don''t work
baddivisions = 100,200,300,400,500,600,700
baddivisions = (100,200,300,400,500,600,700)
baddivisions = 100 & "," & 200 & "," & etc

THIS SNIPIT IS WHERE I NEED TO PUT IT:

Do while NOT Division.EOF
Select Case Division("DivNumber")
case baddivisions <---- this works w/ numbers not w/ variable
donothing = "yes"
case else
Response.Write("<option>" & Division("DivNumber") & "</option>")
END SELECT
Division.MoveNext
Loop
Response.Write ("</select><br>")

Thanks,
Fox






我正在寻找与该字符串中的任何数字匹配。


谢谢,

Fox


" Ray at<%= sLocation%> [MVP] QUOT; < myfirstname at lane34 dot com>写在

消息新闻:#P ************** @ TK2MSFTNGP09.phx.gbl ...
Hi,

I''m looking for a match with any number within the string.

Thanks,
Fox

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:#P**************@TK2MSFTNGP09.phx.gbl...
什么应该产生一个真实的结果?如果Division(Number)=
100,200,300,400 ......或者如果Division(Number)只是该字符串中
中的一个数字?

Ray在工作中

Fox < fox @ connexions .net>在消息中写道
新闻:OM ************* @ TK2MSFTNGP11.phx.gbl ...
What should yield a true result? If Division("Number") =
"100,200,300,400..." or if Division("Number") is just ONE of the numbers in that string?

Ray at work

"Fox" <fox @ connexions .net> wrote in message
news:OM*************@TK2MSFTNGP11.phx.gbl...


任何人都可以告诉我如何创建一个变量,它将连续列出数字然后在精选案例中的案例中使用它?

我需要它可变,因为它必须在一个包含
页面。它需要被ap的每个实例使用,并且数字会针对不同的实例而改变。

不能工作的例子
baddivisions = 100,200,300,400,500,600,700
baddivisions =(100,200,300,400,500,600,700)
baddivisions = 100& "," &安培; 200& "," &安培;等等

这个SNIPIT是我需要投入的地方:

同时不是Division.EOF
选择案例部门(DivNumber)
case baddivisions< ----这个工作w /数字不w /变量
donothing =" yes"
case else
Response.Write("< option>"& ; Division(DivNumber)&"< / option>")
END SELECT
Division.MoveNext
循环
Response.Write("< / select>< br>")

谢谢,
Fox
Hi,

Can anyone tell me how can I create a variable which
will list numbers in a row and then use it in a CASE
within a Select Case?

I need it in a varaible because it has to be in an include
page. It needs to be used by each instance of the ap and
the numbers will change for different instances.

examples that don''t work
baddivisions = 100,200,300,400,500,600,700
baddivisions = (100,200,300,400,500,600,700)
baddivisions = 100 & "," & 200 & "," & etc

THIS SNIPIT IS WHERE I NEED TO PUT IT:

Do while NOT Division.EOF
Select Case Division("DivNumber")
case baddivisions <---- this works w/ numbers not w/ variable
donothing = "yes"
case else
Response.Write("<option>" & Division("DivNumber") & "</option>")
END SELECT
Division.MoveNext
Loop
Response.Write ("</select><br>")

Thanks,
Fox




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

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