Changes

Visual Basic Comparison and Logic

696 bytes removed, 17:18, 7 August 2007
Visual Basic Logical Operators
''If intVal1 is less than 25 AND intVal2 is greater than 45 display a message.''
Here the logical operator is the "AND" part of the sentence. If we were to express this in Visual Basic we would use the AND logical operator <pre> ''Logical Operators'' are also known as ''Boolean Operators'' because they evaluate parts of an expression and return a ''True'' or ''False'' value, allowing decisions to be made about how a script should proceed. The first step to understanding how logical operators work is to construct a sentence rather than to look at a script example right away. Let's assume we need to check some aspect of two variables named intVal1 and intVal2. Our sentence might read''If intVal1 is less than 25 AND intVal2 is greater than 45 display a message.'' Here the logical operator is the "AND" part of the sentence. If we were to express this in Visual Basic we would use the AND logical operator
<pre>