![]() ![]() Real number (8 bytes) with the precision 15 digits in the range: Real number (4 bytes) with the precision 7 digits in the range: For example, &H10 in hexadecimal represents decimal 16. Hexadecimal numbers can be entered directly by preceding numbers in the proper range with &H. The following table shows the subtypes of data that a Variant can contain: subtype These different categories of information that can be contained in a Variant are called subtypes. Of course, you can also have a rich variety of numeric information ranging in size from Boolean values to huge floating-point numbers. When used with other date or time data, the result is always expressed as a date or a time. For example, you can have numeric information that represents a date or a time. Of course, you can always make numbers behave as strings by enclosing them in quotation marks ("").īeyond the simple numeric or string classifications, a Variant can make further distinctions about the specific nature of numeric information. Similarly, if you're working with data that can only be string data, VBScript treats it as string data. That is, if you're working with data that looks like numbers, VBScript assumes that it is numbers and does the thing that is most appropriate for numbers. A Variant behaves as a number when you use it in a numeric context and as a string when you use it in a string context. Because Variant is the only data type in VBScript, it's also the data type returned by all functions in VBScript.Īt its simplest, a Variant can contain either numeric or string information. It is a special kind of the data type that can contain different kinds of information, depending on how it's used. VBScript has only one data type called a Variant. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |