| Def... Statement |
Syntax
DefBool letterrange[,letterrange] DefByte letterrange [,letterrange] DefInt letterrange [,letterrange] DefLng letterrange [,letterrange] DefCur letterrange [,letterrange] DefSng letterrange [,letterrange] DefDbl letterrange [,letterrange] DefDec letterrange [,letterrange] DefDate letterrange [,letterrange] DefStr letterrange [,letterrange] DefObj letterrange [,letterrange] DefVar letterrange [,letterrange]
letterrange
Use: Required
Data Type: String
Use the syntax Letter1[-Letter2].
|
Description
Used at module level to define a default data type for variables, arguments passed to procedures, and the return type for Function and Property Get procedures whose names start with the specified characters. For example, the statement DefStr s tells your program that every variable, function, and argument beginning with the letter "s" is a string data type.
Rules at a Glance
The statement name determines the data type:
Statement Data Type DefBool Boolean DefByte Byte DefInt Integer DefLng Long DefCur Currency DefSng Single DefDbl Double DefDec Decimal DefDate Date DefStr String DefObj Object DefVar Variant You can override the default data types defined with Def... by using ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access