Visual Basic provides six different logical operators. Briefly describe the function of each.
What will be an ideal response?
The And logical operator allows you to combine two or more conditions into a compound condition that can be tested with an If statement. If any of the conditions stated in the compound condition is false, the compound condition is considered false and the statements following the Else portion of the If statement will be executed. When the Or logical operator is used to connect two or more conditions, the compound condition is true if any tested condition is true. Even if four conditional statements are included in the compound condition, if one conditional statement in the compound condition is true, the entire statement is considered true. The Not logical operator allows you to state conditions that are best expressed in a negative way. In essence, it reverses the logical value of a condition on which it operates. With the Xor operator, when one condition in the compound is true, but not both, the compound condition is true. With the AndAlso operator, as soon as a condition is found to be false, no further conditions are tested and the compound condition is false. With the OrElse operator, as soon as a condition is found to be true, no further conditions are tested and the compound condition is true.
You might also like to view...
Using drag-and-drop to move text is most useful when both the text and the destination are on the same:
a. document b. section c. screen
The most common types of output are to the user's screen (called "hard copy") or to a printer (called "soft copy").
Answer the following statement true (T) or false (F)