Draft for Information Only
The sevrer side VBScripte is charactered by some typical features.
The characters of VBScript keywords are restricted to the standard ASCII character set including English alphabet capital letters, English alphabet small letters, Arabic numerals, special symbols ASCII, and some ASCII control characters. While ASCII codes 01-07, 14-1F, and 7F are not supported.
The character code used by VBScript is Unicode. In other words, both VBScript code and data are saved in Unicode character code.
In general, the data form used in VBScript can be divided into five catalogues, namely byte, string, numeric, array, and object.
Byte is the basic data storage unit of VBScript. A Byte is composed of 8 bits. A Boolean value is stored in form of string in VBScript, but a Boolean value can also be converted to a Byte using CByte function. Since the character code used by VBScript is Unicode, the basic character code unit is in form of a Char of 2 bytes. However, a character may be composed of 2 or 4 bytes. For all Unicode characters in the Basic plane, the character code unit is composed of 2 bytes. But for Unicode character outside the Basic plane, the character code unit is composed of 4 bytes.
String is the fundamental information unit of VBScript. A String is a character string that is composed of characters in form of a string of characters in which a character may be a 2 or 4 bytes Unicode character. But a character String that contains no character is a zero-length string, "", with 0 bytes in terms of length of byte. A string of characters is enclosed by double quotes to indicated that the specified is a character String not variable.
Numeric is a special form of String in VBScript. The numeric information of form String is converted into numeric value. Sometime a string expression refers to a character string, while a numeric expression refers to a numeric value.
An array is a container that is used to hold a number of values in form of indexed items. The first index number of an Array is zero for VBScript, that is so called a zero-based array. An Array with one index is called one or single dimension Array. An Array can be in multiidimensional. The dimension of an array indicates the number of indices that is needed when selecting an element. An Array can also be in compound form by embedding an Array to the element of an Array.
An Object is a complex container that is used to hold anumber of things in form of a collection of items. Things insides an Object may be anything, a collection, a property, a method, or an event. In other words, an Object can be considered as a complex procedure which is driven by relation instead of a compound function driven by parameter.
Examples of VarType and TypeName functions
ASP VbScript Command:
HTML Web Page In-line Output:
Results on Microsoft Windows 8.1 Pro x64, Microsoft-IIS/8.5, VBScript Version 5.8 of page /sideway/default.asp
varsa, TypeNameLenB(a), TypeNameb, TypeNameLenB(b), TypeNamea=True:b=CByte(a)[True], Boolean, Long, Byte, Longa=False:b=CByte(a)[False], Boolean, Long, Byte, Longa="True":b=CByte(CBool(a))[True], String, Long, Byte, Longa="False":b=CByte(CBool(a))[False], String, Long, Byte, Longa="a":b="1"[a], String, Long, String, Longa=" ":b=""[ ], String, Long, String, Longa="句":b="你"[句], String, Long[你], String, Longa="ABCDEFG":b="abcdefg"[ABCDEFG], String, Long[abcdefg], String, Longa=123467:b="1234567", Long, Long, String, Longa=1.23467:b="1E+1"[1.23467], Double, Long[1E+1], String, Longa=Array(1,2):b=Split("1 2")['1' '2'], Variant()[error], error["1" "2"], Variant()[error], errorSet a=GetObject("","htmlfile"):Set b=CreateObject("Scripting.Dictionary")[[object]], HTMLDocument, Long[Dictionary], Dictionary[error], error
VBScript has only one data type called a Variant.
A Variant is a special kind of data type that can contain different kinds of information, depending on how it's used. VBScript always assumes the most appropriate data type for those Variants with no specified Data Subtype.
The subtypes of a Variant is used to distinct the specific nature of information by catalogue. The supported subtypes of VBScript are Empty, Null, Boolean, Byte, Integer, Currency, Long, Single, Double, Date, String , Object, and Error. The descriptions of data subtypes are
SubtypeDescriptionEmptyNo data is assigned. Variant is uninitialized. Evaluted value is 0 for numeric variables or a zero-length string ("") for string variables.NullNo valid data is contained. Variant intentionally contains no valid data.BooleanData contained is either True or False.ByteData contained is an integer in the range 0 to 255.IntegerData contained is an integer in the range -32,768 to 32,767.Currency-922,337,203,685,477.5808 to 922,337,203,685,477.5807.LongData contained is an integer in the range -2,147,483,648 to 2,147,483,647.SingleData contained is a single-precision, floating-point number in the range -3.402823E38 to -1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive values.DoubleData contained is a double-precision, floating-point number in the range -1.79769313486232E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values.DateData contained is a number that represents a date between January 1, 100 00:00:00 to December 31, 9999 23:59:59.StringData contained is a variable-length string that can be up to approximately 2 billion characters in length.ObjectData contained is an object reference.ErrorData contained is an error number.
ID: 171100031 Last Updated: 2017/11/30 Revision:
Common Color (1)
Html 401 Special (1)
Number Theory (51)
Process Control (1)
Statics & Dynamics (128)
Fluid Kinematics (5)
Latest Updated Links
Copyright © 2000-2018 Sideway . All rights reserved Disclaimers last modified on 19 May 2015