
|
Shortcut variable initialization with type-declaration characters
In addition to declaring a variable as its explicit data type, VB also lets you declare certain data types using a single type-declaration character. For example, instead of using Dim MyString As String you can use Dim MyString$ Here's a complete list of the data-types and their corresponding
characters: String ($), Integer (%), Long (&), Single (!), Double (#), and Currency (@)
Of course, you should use these characters with caution, as they do reduce your code's readability.
|
||||
| Search RD Techbase | ||||
![]()