Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

Xor

The Xor operator performs the boolean exclusive-or operation. This operator will return True if one of the two expressions evaluates to true. However, if both of the expressions evaluate to True, the operator evaluates as False.

Expr1 Expr2 Result
False False False
False True True
True False True
True True False


You should use this operator if you want to check if one of the two expressions are true (but not both of the expressions are true). In most cases, you can simply use the Or operator since you won't care to exclude the case where both expressions are True.

If Weekday(Date()) = vbMonday Xor Month(Date()) = 1 Then
    Response.Write "It is Monday or it is January"
    Response.Write "But it is not Monday and January"
End If

Orvado, San Diego Web Design

ASP Nuke CMS
Free Open Source
Content Manager
GoSwap Auctions
Buy, Sell
No Fees!

Contact Us | Contribute | About | Site Map



"I only regret that I have one life to lose for my country." - Nathan Hale

©2012 San Diego Web Design - Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.