AND Operator

Logically combines two expressions.

කාරක රීතිය:

ප්‍රතිඵලය = ප්‍රකාශනය1 + ප්‍රකාශනය2

පරාමිතීන්:

Result:සංකලනයේ ප්‍රතිඵලය අඩංගු වන ඕනෑම සංඛ්‍යාත්මක විචල්‍යයක්.

Expression1, Expression2: ඔබට සම්බන්ධ කරීමට අවශ්‍ය ඕනැම සංඛ්‍යාත්මක ප්‍රකාශනයන්.

Boolean expressions combined with AND only return the value True if both expressions evaluate to True:

True AND True returns True; for all other combinations the result is False.

The AND operator also performs a bitwise comparison of identically positioned bits in two numeric expressions.

උදාහරණය:

Sub ExampleAnd

Dim A As Variant, B As Variant, C As Variant, D As Variant

Dim vVarOut As Variant

    A = 10: B = 8: C = 6: D = Null

    vOut = vA > vB Xor vB > vD REM returns -1

    vOut = (vB > vD Xor vB > vA) REM returns 0

    vOut = (vB > vD Xor vB > vA) REM returns 0

    vOut = (vB > vD Xor vB > vA) REM returns 0

    vVarOut = B And A ' returns 8 due to the bitwise And combination of both arguments

End Sub