IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesVB ClassicOperators  Print This     

VB Classic Operators

Assignment

Languages Focus

Common assignment operators for languages include =, ==, and :=. An assignment operator allows you to assign a value to a variable. The value can be a literal value like "Mike" or 42 or the value stored in another variable or returned by a function.

VB Classic:   =

VB Classic uses = for it's assignment operator.

Syntax Example:
Dim Age As Integer
Dim FullName As String
   
FullName = "Randy Spitz"
Age = 38




Cross Reference Examples:

Access VBA:   =

Access uses = for it's assignment operator.

Syntax Example:
Dim Age As Integer
Dim FullName As String
   
FullName = "Randy Spitz"
Age = 38
ASP Classic:   =

ASP Classic uses = for it's assignment operator.

Syntax Example:
FullName = "Randy Spitz"
Age = 38
C#:   =

C# uses = for it's assignment operator.

Syntax Example:
int Age;
string FullName;
  
Age = 42;
FullName = "Randy Spitz";
C++:   =

C++ uses = for it's assignment operator.

Syntax Example:
int Age;
string FullName; //#include <string>
  
Age = 42;
FullName = "Randy Spitz";
C++/CLI:   =

C++/CLI uses = for it's assignment operator.

Syntax Example:
int Age;
string FullName;
  
Age = 42;
FullName = "Randy Spitz";
Corel Paradox:   =

ObjectPAL uses = for it's assignment operator.

Syntax Example:  
var
 FullName String
   Age SmallInt
endVar
  
FullName = "Randy Spitz"
Age = 42
Delphi:   :=

Delphi uses := for it's assignment operator.

Syntax Example:
var
  FullName: String;
  Age: Integer;
begin
  FullName := "Randy Spitz";
Age := 38;
end
Delphi Prism:   :=

Same as Delphi.

Syntax Example:
FullName: String;
Age: Integer;
  
FullName := "Randy Spitz";
Age := 38;
Java:   =

Java uses = for it's assignment operator.

JavaScript:   =

JavaScript uses = for it's assignment operator.

Syntax Example:
//Regular assignment.
LastName = 'Spitz';
  
//Variable declaration with assignment.
var FullName = 'Randy Spitz';
var Age = 38;
Perl:   =

Perl assignment operators:

= Assignment $x = 8;
+= Addition $x += 8;
-= Substraction $x -= 8;
*= Muliplication $x *= 8;
/= Division $x /= 8;
%= Modulus $x %= 8;
**= Exponent $x **= 8;

Syntax Example:
$FullName = "Randy Spitz";
$Age = 38;
PHP:   =

PHP uses = for it's assignment operator.

Syntax Example:
$fullname = "Randy Spitz";
$age = 38;
VB.Net:   =

VB.Net uses = for it's assignment operator.

Syntax Example:  
Dim Age As Integer
Dim FullName As String
  
FullName = "Randy Spitz"
Age = 38




Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]