什么是'<>'asp运算符? [英] What is the '<>' asp operator?

查看:23
本文介绍了什么是'<>'asp运算符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的问题.我试图通过谷歌搜索比迹象不会返回伟大成果小于和大于搜索.

我的猜测是<代码><> 基本上等同于<代码>不等于.所以,下面的表达式将是假的,如果<代码> X 为空或空字符串,和真否则?

 <代码>如果x<>"

解决方案

因此,下面的表达式将如果x是空值或空字符串,和真否则?

是假

不完全.很少有函数来验证值:

 <代码> ISNULL(表达式)

<块引用>

ISNULL返回True如果表达式为Null,也就是说,它不包含任何有效数据;否则,ISNULL返回False.如果表达式包含一个以上的变量,空在任何组分变量会导致真要返回对整个表达式.

空值指示该变量不包含有效数据.null是不一样的空,这表明一个变量具有不尚未初始化.这也是不一样的一个零长度字符串("),其有时被称为空字符串.

<预> <代码>的IsEmpty(表达式)

<块引用>

在表达式参数可以是任何表达.然而,由于为IsEmpty被用来确定是否独立变量初始化,表达式参数最常见的是单独的变量名称.

为IsEmpty如果变量未初始化返回True,或者是明确设置为空的;否则,返回False.假的永远是如果返回的表达包含一个以上的变量.

其他功能良好

<预> <代码> VarType函数(VARNAME)

<块引用>

返回一个表示变量子类型的值.

使用Windows脚本5.6从 HTTP文档://WWW.microsoft.com/en-us/download/details.aspx?id=2764

Simple question. I tried searching, by googling for less than and greater than signs doesn't return great results.

My guess is that <> is basically equivalent to not equals. So, the below expression would be false if x is null or an empty string, and true otherwise?

if x <> ""

解决方案

So, the below expression would be false if x is null or an empty string, and true otherwise?

Not exactly. There are few function to verify value:

IsNull(expression)

IsNull returns True if expression is Null, that is, it contains no valid data; otherwise, IsNull returns False. If expression consists of more than one variable, Null in any constituent variable causes True to be returned for the entire expression.

The Null value indicates that the variable contains no valid data. Null is not the same as Empty, which indicates that a variable has not yet been initialized. It is also not the same as a zero-length string (""), which is sometimes referred to as a null string.

IsEmpty(expression)

The expression argument can be any expression. However, because IsEmpty is used to determine if individual variables are initialized, the expression argument is most often a single variable name.

IsEmpty returns True if the variable is uninitialized, or is explicitly set to Empty; otherwise, it returns False. False is always returned if expression contains more than one variable.

Other good function

VarType(varname)

Returns a value indicating the subtype of a variable.

Use Windows Script 5.6 Documentation from http://www.microsoft.com/en-us/download/details.aspx?id=2764

这篇关于什么是'&lt;&gt;'asp运算符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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