Redian新闻
>
Curious for VBSCRIPT in ASP file
avatar
Curious for VBSCRIPT in ASP file# DotNet - 窗口里的风景
i*p
1
This is an asp file.
ABC = 10000
page = 1
if ( page >= ABC ) then
Response.write ("page is large than ABC")
else
Response.write ("page is less than ABC")
end if
%>
Tell me, what will you see after you run it?
avatar
y*o
2
page is less than ABC
?

【在 i**p 的大作中提到】
: This is an asp file.
: : ABC = 10000
: page = 1
: if ( page >= ABC ) then
: Response.write ("page is large than ABC")
: else
: Response.write ("page is less than ABC")
: end if
: %>

avatar
y*o
3
I just gave it a shot. The output is
Page is less than ABC
Why are you curious about this?

【在 i**p 的大作中提到】
: This is an asp file.
: : ABC = 10000
: page = 1
: if ( page >= ABC ) then
: Response.write ("page is large than ABC")
: else
: Response.write ("page is less than ABC")
: end if
: %>

avatar
i*p
4
My curiousness is my computer gave me another answer!

【在 y********o 的大作中提到】
: I just gave it a shot. The output is
: Page is less than ABC
: Why are you curious about this?

avatar
y*o
5
What version is your asp engine?

【在 i**p 的大作中提到】
: My curiousness is my computer gave me another answer!
avatar
i*p
6
Sorry, my code is this. run it as http://localhost/test.asp?page=1
abc = 10000
page = Request.QueryString("page")

if ( page >= abc ) then
Response.write(page & " > " & abc & "
")
else
Response.write("page is less than IND
")
end if
%>
I guess the problem is from page, which may be STRING. But how can I convert
it to number?

【在 y********o 的大作中提到】
: What version is your asp engine?
avatar
y*o
7
myinteger = Cint(my_string_presentation_of_an_integer)

【在 i**p 的大作中提到】
: Sorry, my code is this. run it as http://localhost/test.asp?page=1
: : abc = 10000
: page = Request.QueryString("page")
:
: if ( page >= abc ) then
: Response.write(page & " > " & abc & "
")
: else
: Response.write("page is less than IND
")
: end if

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。