How to Initialize Static Variables to Nonzero Values (119737)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q119737 SUMMARY
Normally in Visual Basic, when a static variable is declared inside a
Function or Sub procedure, it gets initialized to 0 (numeric data type) or
an empty string, "" (string data type), by default. This article shows a
way to initialize these variables to values other than the default.
Modification Type: | Major | Last Reviewed: | 12/9/2003 |
---|
Keywords: | KB119737 |
---|
|