Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

06 Operators


'VB supports the following operators

'Arithmetic
+  addition For numbers
-  substraction
/  division
\   Integer division, discards the Decimal part of the answer
*  multiply
^  exponentiation
Mod  division, returning only the remainder

'Comparison
=  equal
<  less than
>  greater than
<>   Not equal
>=  greater than Or equal To
<=  less than Or equal To
Is  two variables / objects are the same
Like  variable matches a pattern

'Concatenation
& combines two strings into one
+  combines two strings into one ( Is addition for numbers)

'Logical
And  logical conjunction (both values True )
Or  logical disjunction (either value True )
Not  logical negation (reverses True / False value)
Xor  logical exclusion ( True If one, And only one, Is True )
Imp  logical implication (e9e9
Eqv  logical equivalence ( True If both have same logical value)