Search here for all the info you want in this Blog

Implicit and explicit Declaration

Here are some rules on variable declaration:
Explicit Declaration
§ A variable is declared with the "Dim" statement in the following syntax:
§ Dim variable_name, ... where "variable_name" is a text label to identify this variable. Multiple variables can be declared with single "Dim" statement.
§ The data type of this variable will be Variant.
Implicit Declaration
§ A variable name is used on the left side of an assignment statement without being declared previously. The data type of an implicitly declared variable is "Variant". Here are some examples of variable implicit declaration:
§ author = "Herong" ' Implicit declaration of "author"
§ buffer = 1/3 ' Implicit declaration of "buffer“

No comments:

Post a Comment