条件在传统的ASP选择/ Case语句案例 [英] Condition in Case of Select/Case statement in classic ASP
本文介绍了条件在传统的ASP选择/ Case语句案例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近一直在负责更新传统的ASP页面,并没有这个语言的经验。是否有可能写一个状态到选择
语句的情况
像这样:
选择案例<变量>
案例< VALUE> &功放;&安培; <如果变量2 ==&东西GT;
案例< VALUE> || <如果变量2 ==别的>
解决方案
本使用逗号语法:
案例<价值>中变量2 =别的< ---满足的情况下任何一个条件。
您不能建立IF语句插入的情况。
顺便说一句:VBScript使用和,或和=,代替与&&放大器; ||或==
平等和分配都使用=和根据上下文。
I've recently been tasked with updating a classic ASP page and have no experience in this language. Is it possible to write a condition into a Select
statement's case
like so:
Select Case <variable>
Case <value> && <if variable2 == something>
Case <value> || <if variable2 == something else>
解决方案
This uses comma syntax:
Case <value>, variable2 = something else <--- case satisfies either condition.
You cannot build IF statements into the cases.
BTW: VBScript uses "and", "or" and "=", instead of "&&" "||" or "=="
Equal and assignment both use "=" and are context-dependent.
这篇关于条件在传统的ASP选择/ Case语句案例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文