Sideway
output.to from Sideway
Draft for Information Only

Content

VBScript Variant Subtypes
  Currency Subtype
   Examples of Currency Subtype
  Date Subtype
   Examples of Date Subtype
  String Subtype
   Examples of String Subtype
  Object Subtype
   Examples of Object Subtype
  Array Subtype
   Examples of Double Subtype
  Error Subtype
   Examples of Example Subtype

VBScript Variant Subtypes

In general, data subtypes are always depend on implementing version, application, and platform. Provided information is based on Microsoft Windows 8.1 Pro x64, VBScript Version 5.8. Integer subtype denotes a 2-byte data of a signed 16-bit integer

Currency Subtype

The Currency subtype refers to a Variant variable that contained is evaluated as currency expression limited to a ten-thousandth of a signed 64-bit integer in 4-byte data with range in value from -922337203685477.5808 through 922337203685477.5807. In other words, a Variant variable of Currency subtype can be used to hold a decimal number inform of a scaled integer that contains a fixed decimal point with always 4 dight places after decimal point in the range -922337203685477.5808 through 922337203685477.5807. The CCur function can be used to convert valid numeric expressions to Currency values.

Examples of Currency Subtype

Currency value is a scaled integer fixed with 4 decimal digits in the range -922337203685477.5808 through 922337203685477.5807 on Microsoft Windows 8.1 Pro x64, VBScript Version 5.8..
ASP VbScript Command:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
<script runat="server" language="VBScript">
Function printdata
cmda=array("TypeName(a)","LenB(a)","MidB(a,1)","TypeName(CCur(a))","LenB(CCur(a))","MidB(CCur(a),1)"):ucnt=UBound(cmda):call heading
vars="a=""-922337203685477.5809""":dsp_x
vars="a=""-922337203685477.58086""":dsp_x
vars="a=""-922337203685477.58085""":dsp_x
vars="a=""-922337203685477.5808""":dsp_x
vars="a=""-922337203685477.12345""":dsp_x
vars="a=""922337203685477.12305""":dsp_x
vars="a=""922337203685477.5807""":dsp_x
vars="a=""922337203685477.58075""":dsp_x
vars="a=""922337203685477.5808""":dsp_x
vars="a=""&H7FFFFFFFFFFFFFFF"":a=a/10000-0.5808":dsp_x
End Function
Dim abb,cnt,cmda,cmp,dai,dlt,dte,dad,e,fnd,flg,fir,f_dw,gbd,hor,i,ild,k,mth,min,num,pnn,pi,sec,str1,str2,str,strs,tme,tmp,ucnt,var,vars,varx,wkd,x,z:varx=0
Function heading:If var=1 Then:tmp="":Else:tmp="<b>vars</b>":End If:For i=0 to ucnt:tmp=tmp&"<b>"&rmv_ctrl(cmda(i))&", TypeName</b>":Next:Response.Write "Results on Microsoft Windows Server 2008 R2 Standard  x64, Microsoft-IIS/7.5, VB Version 14.0<br />"&"<i>"&tmp&"</i>":End Function
Function dsp_x:Dim tmp_a,tmp_b,i:If varx=0  Then:Execute vars:End If:If var=1 Then:tmp_a="":Else:tmp_a=rmv_ctrl(vars):End If:For i=0 to ucnt:tmp_b=cmd_b(cmda(i)):if i/2=fix(i/2) Then:tmp_b="<b>"&tmp_b&"</b>":End If:tmp_a=tmp_a&tmp_b:Next:Response.Write "<i>"&tmp_a&"</i>":End Function
Function rmv_ctrl(blk_str):Select Case blk_str:Case chr(0):blk_str="NUL":Case chr(1):blk_str="SOH":Case chr(2):blk_str="STX":Case chr(3):blk_str="ETX":Case chr(4):blk_str="EOT":Case chr(5):blk_str="ENQ":Case chr(6):blk_str="ACK":Case chr(7):blk_str="BEL":Case chr(8):blk_str="BS":Case chr(9):blk_str="HT":Case chr(10):blk_str="LF":Case chr(11):blk_str="VT":Case chr(12):blk_str="FF":Case chr(13):blk_str="CR":Case chr(14):blk_str="SO":Case chr(15):blk_str="SI":Case chr(16):blk_str="DLE":Case chr(17):blk_str="DC1":Case chr(18):blk_str="DC2":Case chr(19):blk_str="DC3":Case chr(20):blk_str="DC4":Case chr(21):blk_str="NAK":Case chr(22):blk_str="SYN":Case chr(23):blk_str="ETB":Case chr(24):blk_str="CAN":Case chr(25):blk_str="EM":Case chr(26):blk_str="SUB":Case chr(27):blk_str="ESC":Case chr(28):blk_str="FS":Case chr(29):blk_str="GS":Case chr(30):blk_str="RS":Case chr(31):blk_str="US":Case chr(127):blk_str="DEL":End Select:rmv_ctrl=blk_str:If IsNull(blk_str) OR IsEmpty(Blk_str) OR blk_str="" OR IsNumeric(Blk_str) Then:Else:rmv_ctrl=Replace(Replace(Replace(Replace(Replace(blk_str,"&","&amp;"),"  "," &nbsp;"),"""","&quot;"),"<","&lt;"),">","&gt;"): End If :End Function
Function cmd_b(blk_str):cmd_b="["&cmd_x(blk_str)&"], "&cmd_x("TypeName("&blk_str&")"):End Function
Function cmd_x(blk_str):On Error Resume Next:Dim xans, tmp:xans="":tmp="":execute "xans="&blk_str:If Err.Number <> 0  Then:xans=cmd_x("TypeName("&blk_str&")"):Select Case xans:Case 9::Case Else:xans="error":End Select:End If:If IsArray(xans)=False Then:cmd_x=rmv_ctrl(xans): Else:tmp=lst_arry(xans):cmd_x=trim(tmp):End If:End Function
Function lst_arry(blk_str):Dim tmp,i,q:q="""":tmp="":For i=0 to UBound(blk_str):if VarType(blk_str(i))>1 And VarType(blk_str(i))<6 Then:q="'":End If:tmp=tmp&" "&q&rmv_ctrl(blk_str(i))&q:Next:lst_arry=trim(tmp):End Function
</script>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
        <style type="text/css">
           i {display:table-row}
           u,b {display:table-cell}
        </style>
    </head>
    <body>
<%call printdata %>
    </body>
</html>
HTML Web Page Embedded Output:

Date Subtype

The Date subtype refers to a Variant variable that contained is evaluated as a date and/or time data with range in value from January 1, 100 00:00:00 through December 31, 9999 23:59:59. In other words, a Variant variable of Long subtype can be used to hold a date and/or time according to the local system setting in the range January 1, 100 00:00:00 through December 31, 9999 23:59:59. Years "00"-"99" are usually used as a year shortcut on some Windows according local systme setting.

The CDate function can be used to convert valid date expressions to Date values. The CDate function can also convert a numeric expression into Date values. The zero-date value is December 30, 1899 12:00:00 AM on Microsoft Windows 8.1 Pro x64, VBScript Version 5.8. Besides a valid String Date value can also be used as a Date literal value by enclosing within number signs (#…#).

 

Examples of Date Subtype

Date value is a date and/or time in the range January 1, 100 00:00:00 through December 31, 9999 23:59:59 on Microsoft Windows 8.1 Pro x64, VBScript Version 5.8.
ASP VbScript Command:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
<script runat="server" language="VBScript">
Function printdata
cmda=array("TypeName(a)","LenB(a)","MidB(a,1)","TypeName(CDate(a))","LenB(CDate(a))","MidB(CDate(a),1)"):ucnt=UBound(cmda):call heading
vars="a=Now":dsp_x
vars="a=""11/11/1111 11:11:11 PM""":dsp_x
vars="a=#11/11/1111 11:11:11 PM#":dsp_x
vars="a=""Dec 31, 0099 12:59:59 PM""":dsp_x
vars="a=""Jan 01, 0100 00:00:00""":dsp_x
vars="a=""Jan 01, 0100 12:00:00 AM""":dsp_x
vars="a=""Jan 01, 0100 00:00:00 AM""":dsp_x
vars="a=""Jan 01, 0100 00:00:01 AM""":dsp_x
vars="a=""Jan 01, 0100 00:00:00 PM""":dsp_x
vars="a=""Jan 01, 0100 00:00:01 PM""":dsp_x
vars="a=""Dec 31, 9999 12:59:58 PM""":dsp_x
vars="a=""Dec 31, 9999 12:59:59 PM""":dsp_x
vars="a=""Dec 31, 9999 23:59:59""":dsp_x
vars="a=""Dec 31, 9999 12:59:60 PM""":dsp_x
vars="a=""Dec 31, 9999 23:59:60""":dsp_x
vars="a=-1":dsp_x
vars="a=-0":dsp_x
vars="a=0":dsp_x
vars="a=1":dsp_x
vars="a=#11/11/1111 11:11:11 PM#":dsp_x
End Function
Dim abb,cnt,cmda,cmp,dai,dlt,dte,dad,e,fnd,flg,fir,f_dw,gbd,hor,i,ild,k,mth,min,num,pnn,pi,sec,str1,str2,str,strs,tme,tmp,ucnt,var,vars,varx,wkd,x,z:varx=0
Function heading:If var=1 Then:tmp="":Else:tmp="<b>vars</b>":End If:For i=0 to ucnt:tmp=tmp&"<b>"&rmv_ctrl(cmda(i))&", TypeName</b>":Next:Response.Write "Results on Microsoft Windows Server 2008 R2 Standard  x64, Microsoft-IIS/7.5, VB Version 14.0<br />"&"<i>"&tmp&"</i>":End Function
Function dsp_x:Dim tmp_a,tmp_b,i:If varx=0  Then:Execute vars:End If:If var=1 Then:tmp_a="":Else:tmp_a=rmv_ctrl(vars):End If:For i=0 to ucnt:tmp_b=cmd_b(cmda(i)):if i/2=fix(i/2) Then:tmp_b="<b>"&tmp_b&"</b>":End If:tmp_a=tmp_a&tmp_b:Next:Response.Write "<i>"&tmp_a&"</i>":End Function
Function rmv_ctrl(blk_str):Select Case blk_str:Case chr(0):blk_str="NUL":Case chr(1):blk_str="SOH":Case chr(2):blk_str="STX":Case chr(3):blk_str="ETX":Case chr(4):blk_str="EOT":Case chr(5):blk_str="ENQ":Case chr(6):blk_str="ACK":Case chr(7):blk_str="BEL":Case chr(8):blk_str="BS":Case chr(9):blk_str="HT":Case chr(10):blk_str="LF":Case chr(11):blk_str="VT":Case chr(12):blk_str="FF":Case chr(13):blk_str="CR":Case chr(14):blk_str="SO":Case chr(15):blk_str="SI":Case chr(16):blk_str="DLE":Case chr(17):blk_str="DC1":Case chr(18):blk_str="DC2":Case chr(19):blk_str="DC3":Case chr(20):blk_str="DC4":Case chr(21):blk_str="NAK":Case chr(22):blk_str="SYN":Case chr(23):blk_str="ETB":Case chr(24):blk_str="CAN":Case chr(25):blk_str="EM":Case chr(26):blk_str="SUB":Case chr(27):blk_str="ESC":Case chr(28):blk_str="FS":Case chr(29):blk_str="GS":Case chr(30):blk_str="RS":Case chr(31):blk_str="US":Case chr(127):blk_str="DEL":End Select:rmv_ctrl=blk_str:If IsNull(blk_str) OR IsEmpty(Blk_str) OR blk_str="" OR IsNumeric(Blk_str) Then:Else:rmv_ctrl=Replace(Replace(Replace(Replace(Replace(blk_str,"&","&amp;"),"  "," &nbsp;"),"""","&quot;"),"<","&lt;"),">","&gt;"): End If :End Function
Function cmd_b(blk_str):cmd_b="["&cmd_x(blk_str)&"], "&cmd_x("TypeName("&blk_str&")"):End Function
Function cmd_x(blk_str):On Error Resume Next:Dim xans, tmp:xans="":tmp="":execute "xans="&blk_str:If Err.Number <> 0  Then:xans=cmd_x("TypeName("&blk_str&")"):Select Case xans:Case 9::Case Else:xans="error":End Select:End If:If IsArray(xans)=False Then:cmd_x=rmv_ctrl(xans): Else:tmp=lst_arry(xans):cmd_x=trim(tmp):End If:End Function
Function lst_arry(blk_str):Dim tmp,i,q:q="""":tmp="":For i=0 to UBound(blk_str):if VarType(blk_str(i))>1 And VarType(blk_str(i))<6 Then:q="'":End If:tmp=tmp&" "&q&rmv_ctrl(blk_str(i))&q:Next:lst_arry=trim(tmp):End Function
</script>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
        <style type="text/css">
           i {display:table-row}
           u,b {display:table-cell}
        </style>
    </head>
    <body>
<%call printdata %>
    </body>
</html>
HTML Web Page Embedded Output:

String Subtype

The Single subtype refers to a Variant variable that contained is evaluated as a sequence of unsigned 16-bit code points in 2-byte data with range in value from 0 through 65535. In other words, a Variant variable of String subtype can be used to hold a sequence of Unicode code points that represents corresponding Unicode characters using a 2-byte data unit with range in value from 0 through 65535. Therefore the Single subtype contains a variable-length string value which can be hold up to approximately 2 billion characters in length.

The CStr function can be used to convert valid expressions to String values. A valid String value can also be used as a String literal value by enclosing within quotation marks ("⋯"). Two contiguous quotation marks is used as a character within quotation marks of a String literal value when a quotation mark must be used as a character in the string within quotation marks, A zero-length can be represented by a String literal value with two contiguous quotation marks only, "".

Examples of String Subtype

String value is a sequence of Unicode code points that represents corresponding Unicode characters using a 2-byte data unit with range in value from 0 through 65535 on Microsoft Windows 8.1 Pro x64, VBScript Version 5.8..
ASP VbScript Command:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
<script runat="server" language="VBScript">
Function printdata
cmda=array("TypeName(a)","LenB(a)","MidB(a,1)","TypeName(CDate(a))","LenB(CDate(a))","MidB(CDate(a),1)"):ucnt=UBound(cmda):call heading
vars="a=Now":dsp_x
vars="a=""11/11/1111 11:11:11 PM""":dsp_x
vars="a=#11/11/1111 11:11:11 PM#":dsp_x
vars="a=""Dec 31, 0099 12:59:59 PM""":dsp_x
vars="a=""Jan 01, 0100 00:00:00""":dsp_x
vars="a=""Jan 01, 0100 12:00:00 AM""":dsp_x
vars="a=""Jan 01, 0100 00:00:00 AM""":dsp_x
vars="a=""Jan 01, 0100 00:00:01 AM""":dsp_x
vars="a=""Jan 01, 0100 00:00:00 PM""":dsp_x
vars="a=""Jan 01, 0100 00:00:01 PM""":dsp_x
vars="a=""Dec 31, 9999 12:59:58 PM""":dsp_x
vars="a=""Dec 31, 9999 12:59:59 PM""":dsp_x
vars="a=""Dec 31, 9999 23:59:59""":dsp_x
vars="a=""Dec 31, 9999 12:59:60 PM""":dsp_x
vars="a=""Dec 31, 9999 23:59:60""":dsp_x
vars="a=-1":dsp_x
vars="a=-0":dsp_x
vars="a=0":dsp_x
vars="a=1":dsp_x
vars="a=#11/11/1111 11:11:11 PM#":dsp_x
End Function
Dim abb,cnt,cmda,cmp,dai,dlt,dte,dad,e,fnd,flg,fir,f_dw,gbd,hor,i,ild,k,mth,min,num,pnn,pi,sec,str1,str2,str,strs,tme,tmp,ucnt,var,vars,varx,wkd,x,z:varx=0
Function heading:If var=1 Then:tmp="":Else:tmp="<b>vars</b>":End If:For i=0 to ucnt:tmp=tmp&"<b>"&rmv_ctrl(cmda(i))&", TypeName</b>":Next:Response.Write "Results on Microsoft Windows Server 2008 R2 Standard  x64, Microsoft-IIS/7.5, VB Version 14.0<br />"&"<i>"&tmp&"</i>":End Function
Function dsp_x:Dim tmp_a,tmp_b,i:If varx=0  Then:Execute vars:End If:If var=1 Then:tmp_a="":Else:tmp_a=rmv_ctrl(vars):End If:For i=0 to ucnt:tmp_b=cmd_b(cmda(i)):if i/2=fix(i/2) Then:tmp_b="<b>"&tmp_b&"</b>":End If:tmp_a=tmp_a&tmp_b:Next:Response.Write "<i>"&tmp_a&"</i>":End Function
Function rmv_ctrl(blk_str):Select Case blk_str:Case chr(0):blk_str="NUL":Case chr(1):blk_str="SOH":Case chr(2):blk_str="STX":Case chr(3):blk_str="ETX":Case chr(4):blk_str="EOT":Case chr(5):blk_str="ENQ":Case chr(6):blk_str="ACK":Case chr(7):blk_str="BEL":Case chr(8):blk_str="BS":Case chr(9):blk_str="HT":Case chr(10):blk_str="LF":Case chr(11):blk_str="VT":Case chr(12):blk_str="FF":Case chr(13):blk_str="CR":Case chr(14):blk_str="SO":Case chr(15):blk_str="SI":Case chr(16):blk_str="DLE":Case chr(17):blk_str="DC1":Case chr(18):blk_str="DC2":Case chr(19):blk_str="DC3":Case chr(20):blk_str="DC4":Case chr(21):blk_str="NAK":Case chr(22):blk_str="SYN":Case chr(23):blk_str="ETB":Case chr(24):blk_str="CAN":Case chr(25):blk_str="EM":Case chr(26):blk_str="SUB":Case chr(27):blk_str="ESC":Case chr(28):blk_str="FS":Case chr(29):blk_str="GS":Case chr(30):blk_str="RS":Case chr(31):blk_str="US":Case chr(127):blk_str="DEL":End Select:rmv_ctrl=blk_str:If IsNull(blk_str) OR IsEmpty(Blk_str) OR blk_str="" OR IsNumeric(Blk_str) Then:Else:rmv_ctrl=Replace(Replace(Replace(Replace(Replace(blk_str,"&","&amp;"),"  "," &nbsp;"),"""","&quot;"),"<","&lt;"),">","&gt;"): End If :End Function
Function cmd_b(blk_str):cmd_b="["&cmd_x(blk_str)&"], "&cmd_x("TypeName("&blk_str&")"):End Function
Function cmd_x(blk_str):On Error Resume Next:Dim xans, tmp:xans="":tmp="":execute "xans="&blk_str:If Err.Number <> 0  Then:xans=cmd_x("TypeName("&blk_str&")"):Select Case xans:Case 9::Case Else:xans="error":End Select:End If:If IsArray(xans)=False Then:cmd_x=rmv_ctrl(xans): Else:tmp=lst_arry(xans):cmd_x=trim(tmp):End If:End Function
Function lst_arry(blk_str):Dim tmp,i,q:q="""":tmp="":For i=0 to UBound(blk_str):if VarType(blk_str(i))>1 And VarType(blk_str(i))<6 Then:q="'":End If:tmp=tmp&" "&q&rmv_ctrl(blk_str(i))&q:Next:lst_arry=trim(tmp):End Function
</script>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
        <style type="text/css">
           i {display:table-row}
           u,b {display:table-cell}
        </style>
    </head>
    <body>
<%call printdata %>
    </body>
</html>
HTML Web Page Embedded Output:

Object Subtype

The Object subtype refers to a Variant variable that contained is an instance of Object reference entity of any reference type and any value type in 4-byte data. The Object value is only a reference pointer used to point to the actual referenced data value. In other words, a Variant variable of Object subtype can be used to hold a reference pointer of an Object reference entity in 4-byte data.

An Object subtype can not be Null or Empty because an Object subtype is only used as a reference point of a data value. A Nothing literal is used to specify an Object value does not refer to any valid reference data value similar to Null that not assign to any valid data value.

Examples of Object Subtype

Object value is a reference pointer of an Object reference entity in 4-byte data. on Microsoft Windows 8.1 Pro x64, VBScript Version 5.8..
ASP VbScript Command:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
<script runat="server" language="VBScript">
Function reftest():reftest="reftestok":End Function
Function printdata
cmda=array("obj1"):ucnt=UBound(cmda):call heading
On Error Resume Next
vars="strs=""htmlfile"":strs1=""\"":Set obj1=GetObject(strs1,strs)":dsp_x
vars="strs=""VBScript.RegExp"":Set obj1= CreateObject(strs)":dsp_x
vars="strs=""cmd_b"":Set obj1=GetRef(strs)":dsp_x
vars="strs="""":Set obj1=Nothing":Execute vars:dsp_x
vars="strs=""reftest"":Set obj1=GetRef(strs)":dsp_x
vars="strs=""reftest"":obj1=GetRef(strs)":dsp_x
vars="strs=""reftest"":obj1=TypeName(GetRef(strs))":dsp_x
End Function
Dim abb,cnt,cmda,cmp,dai,dlt,dte,dad,e,fnd,flg,fir,f_dw,gbd,hor,i,ild,k,mth,min,num,pnn,pi,sec,str1,str2,str,strs,tme,tmp,ucnt,var,vars,varx,wkd,x,z:varx=0
Function heading:If var=1 Then:tmp="":Else:tmp="<b>vars</b>":End If:For i=0 to ucnt:tmp=tmp&"<b>"&rmv_ctrl(cmda(i))&", TypeName</b>":Next:Response.Write "Results on Microsoft Windows Server 2008 R2 Standard  x64, Microsoft-IIS/7.5, VB Version 14.0<br />"&"<i>"&tmp&"</i>":End Function
Function dsp_x:Dim tmp_a,tmp_b,i:If varx=0  Then:Execute vars:End If:If var=1 Then:tmp_a="":Else:tmp_a=rmv_ctrl(vars):End If:For i=0 to ucnt:tmp_b=cmd_b(cmda(i)):if i/2=fix(i/2) Then:tmp_b="<b>"&tmp_b&"</b>":End If:tmp_a=tmp_a&tmp_b:Next:Response.Write "<i>"&tmp_a&"</i>":End Function
Function rmv_ctrl(blk_str):Select Case blk_str:Case chr(0):blk_str="NUL":Case chr(1):blk_str="SOH":Case chr(2):blk_str="STX":Case chr(3):blk_str="ETX":Case chr(4):blk_str="EOT":Case chr(5):blk_str="ENQ":Case chr(6):blk_str="ACK":Case chr(7):blk_str="BEL":Case chr(8):blk_str="BS":Case chr(9):blk_str="HT":Case chr(10):blk_str="LF":Case chr(11):blk_str="VT":Case chr(12):blk_str="FF":Case chr(13):blk_str="CR":Case chr(14):blk_str="SO":Case chr(15):blk_str="SI":Case chr(16):blk_str="DLE":Case chr(17):blk_str="DC1":Case chr(18):blk_str="DC2":Case chr(19):blk_str="DC3":Case chr(20):blk_str="DC4":Case chr(21):blk_str="NAK":Case chr(22):blk_str="SYN":Case chr(23):blk_str="ETB":Case chr(24):blk_str="CAN":Case chr(25):blk_str="EM":Case chr(26):blk_str="SUB":Case chr(27):blk_str="ESC":Case chr(28):blk_str="FS":Case chr(29):blk_str="GS":Case chr(30):blk_str="RS":Case chr(31):blk_str="US":Case chr(127):blk_str="DEL":End Select:rmv_ctrl=blk_str:If IsNull(blk_str) OR IsEmpty(Blk_str) OR blk_str="" OR IsNumeric(Blk_str) Then:Else:rmv_ctrl=Replace(Replace(Replace(Replace(Replace(blk_str,"&","&amp;"),"  "," &nbsp;"),"""","&quot;"),"<","&lt;"),">","&gt;"): End If :End Function
Function cmd_b(blk_str):cmd_b="["&cmd_x(blk_str)&"], "&cmd_x("TypeName("&blk_str&")"):End Function
Function cmd_x(blk_str):On Error Resume Next:Dim xans, tmp:xans="":tmp="":execute "xans="&blk_str:If Err.Number <> 0  Then:xans=cmd_x("TypeName("&blk_str&")"):Select Case xans:Case 9::Case Else:xans="error":End Select:End If:If IsArray(xans)=False Then:cmd_x=rmv_ctrl(xans): Else:tmp=lst_arry(xans):cmd_x=trim(tmp):End If:End Function
Function lst_arry(blk_str):Dim tmp,i,q:q="""":tmp="":For i=0 to UBound(blk_str):if VarType(blk_str(i))>1 And VarType(blk_str(i))<6 Then:q="'":End If:tmp=tmp&" "&q&rmv_ctrl(blk_str(i))&q:Next:lst_arry=trim(tmp):End Function
</script>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
        <style type="text/css">
           i {display:table-row}
           u,b {display:table-cell}
        </style>
    </head>
    <body>
<%call printdata %>
    </body>
</html>
HTML Web Page Embedded Output:

Array Subtype

The Array subtype refers to a Variant variable that contained is a collection of indexed array values of any reference type and any value type. An Array can be simple, compound, or complex. The dimension of an array is the number of indices needed to select an element. The upper limit for multidimensional arrays is 60 dimensions. Each dimension count at zero. In other words, a Variant variable of Array subtype can be used to hold a zero-based of maximum 60 dimensions array with indexed values of any reference type and any value type.

The VarType of an Variant Array Subtype of Variant Values always returns 8192+12=8204 to indicate that the VarType is an vbArray of type vbVariant.

Examples of Double Subtype

Array value is a zero-based  multidimensional array with indexed values of any reference type and any value typeon Microsoft Windows 8.1 Pro x64, VBScript Version 5.8..
ASP VbScript Command:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
<script runat="server" language="VBScript">
Function reftest():reftest="reftestok":End Function
Function printdata
cmda=array("TypeName(a)","VarType(a)","a(0)","VarType(a(0))"):ucnt=UBound(cmda):call heading
On Error Resume Next
vars="a=Array(1,2,3)":dsp_x
vars="a=Split(""1 2 3"")":dsp_x
vars="a=Split(""a b c"")":dsp_x
vars="ReDim a(1,2):":dsp_x
vars="ReDim a(1,2,3)":dsp_x
vars="strs=""reftest"":obj1=GetRef(strs):a=Array(obj11,2,3)":dsp_x
End Function
Dim abb,cnt,cmda,cmp,dai,dlt,dte,dad,e,fnd,flg,fir,f_dw,gbd,hor,i,ild,k,mth,min,num,pnn,pi,sec,str1,str2,str,strs,tme,tmp,ucnt,var,vars,varx,wkd,x,z:varx=0
Function heading:If var=1 Then:tmp="":Else:tmp="<b>vars</b>":End If:For i=0 to ucnt:tmp=tmp&"<b>"&rmv_ctrl(cmda(i))&", TypeName</b>":Next:Response.Write "Results on Microsoft Windows Server 2008 R2 Standard  x64, Microsoft-IIS/7.5, VB Version 14.0<br />"&"<i>"&tmp&"</i>":End Function
Function dsp_x:Dim tmp_a,tmp_b,i:If varx=0  Then:Execute vars:End If:If var=1 Then:tmp_a="":Else:tmp_a=rmv_ctrl(vars):End If:For i=0 to ucnt:tmp_b=cmd_b(cmda(i)):if i/2=fix(i/2) Then:tmp_b="<b>"&tmp_b&"</b>":End If:tmp_a=tmp_a&tmp_b:Next:Response.Write "<i>"&tmp_a&"</i>":End Function
Function rmv_ctrl(blk_str):Select Case blk_str:Case chr(0):blk_str="NUL":Case chr(1):blk_str="SOH":Case chr(2):blk_str="STX":Case chr(3):blk_str="ETX":Case chr(4):blk_str="EOT":Case chr(5):blk_str="ENQ":Case chr(6):blk_str="ACK":Case chr(7):blk_str="BEL":Case chr(8):blk_str="BS":Case chr(9):blk_str="HT":Case chr(10):blk_str="LF":Case chr(11):blk_str="VT":Case chr(12):blk_str="FF":Case chr(13):blk_str="CR":Case chr(14):blk_str="SO":Case chr(15):blk_str="SI":Case chr(16):blk_str="DLE":Case chr(17):blk_str="DC1":Case chr(18):blk_str="DC2":Case chr(19):blk_str="DC3":Case chr(20):blk_str="DC4":Case chr(21):blk_str="NAK":Case chr(22):blk_str="SYN":Case chr(23):blk_str="ETB":Case chr(24):blk_str="CAN":Case chr(25):blk_str="EM":Case chr(26):blk_str="SUB":Case chr(27):blk_str="ESC":Case chr(28):blk_str="FS":Case chr(29):blk_str="GS":Case chr(30):blk_str="RS":Case chr(31):blk_str="US":Case chr(127):blk_str="DEL":End Select:rmv_ctrl=blk_str:If IsNull(blk_str) OR IsEmpty(Blk_str) OR blk_str="" OR IsNumeric(Blk_str) Then:Else:rmv_ctrl=Replace(Replace(Replace(Replace(Replace(blk_str,"&","&amp;"),"  "," &nbsp;"),"""","&quot;"),"<","&lt;"),">","&gt;"): End If :End Function
Function cmd_b(blk_str):cmd_b="["&cmd_x(blk_str)&"], "&cmd_x("TypeName("&blk_str&")"):End Function
Function cmd_x(blk_str):On Error Resume Next:Dim xans, tmp:xans="":tmp="":execute "xans="&blk_str:If Err.Number <> 0  Then:xans=cmd_x("TypeName("&blk_str&")"):Select Case xans:Case 9::Case Else:xans="error":End Select:End If:If IsArray(xans)=False Then:cmd_x=rmv_ctrl(xans): Else:tmp=lst_arry(xans):cmd_x=trim(tmp):End If:End Function
Function lst_arry(blk_str):Dim tmp,i,q:q="""":tmp="":For i=0 to UBound(blk_str):if VarType(blk_str(i))>1 And VarType(blk_str(i))<6 Then:q="'":End If:tmp=tmp&" "&q&rmv_ctrl(blk_str(i))&q:Next:lst_arry=trim(tmp):End Function
</script>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
        <style type="text/css">
           i {display:table-row}
           u,b {display:table-cell}
        </style>
    </head>
    <body>
<%call printdata %>
    </body>
</html>
HTML Web Page Embedded Output:

Error Subtype

The Error subtype refers to a Variant variable that contained is an error number. In other words, a Variant variable of Error subtype can be used to hold an error number. Since the CVErr conversion function used to returns a Variant of subtype Error containing an error number specified by the user is not supported in VBScript, the use of Error subtype cannot be easily implemented in VBScript.

Examples of Example Subtype

Following are examples of using global intrinsic object to handle error instead of example of implementing the Error Subtype on Microsoft Windows 8.1 Pro x64, VBScript Version 5.8..
ASP VbScript Command:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
<script runat="server" language="VBScript">
Function printdata
cmda=array("a"):ucnt=UBound(cmda):call heading
vars="On Error Resume Next: Err.Raise 8:a=Err.Number:Err.Clear":dsp_x
vars="On Error Resume Next: Err.Raise 13:a=Err.Number:Err.Clear":dsp_x
End Function
Dim abb,cnt,cmda,cmp,dai,dlt,dte,dad,e,fnd,flg,fir,f_dw,gbd,hor,i,ild,k,mth,min,num,pnn,pi,sec,str1,str2,str,strs,tme,tmp,ucnt,var,vars,varx,wkd,x,z:varx=0
Function heading:If var=1 Then:tmp="":Else:tmp="<b>vars</b>":End If:For i=0 to ucnt:tmp=tmp&"<b>"&rmv_ctrl(cmda(i))&", TypeName</b>":Next:Response.Write "Results on Microsoft Windows Server 2008 R2 Standard  x64, Microsoft-IIS/7.5, VB Version 14.0<br />"&"<i>"&tmp&"</i>":End Function
Function dsp_x:Dim tmp_a,tmp_b,i:If varx=0  Then:Execute vars:End If:If var=1 Then:tmp_a="":Else:tmp_a=rmv_ctrl(vars):End If:For i=0 to ucnt:tmp_b=cmd_b(cmda(i)):if i/2=fix(i/2) Then:tmp_b="<b>"&tmp_b&"</b>":End If:tmp_a=tmp_a&tmp_b:Next:Response.Write "<i>"&tmp_a&"</i>":End Function
Function rmv_ctrl(blk_str):Select Case blk_str:Case chr(0):blk_str="NUL":Case chr(1):blk_str="SOH":Case chr(2):blk_str="STX":Case chr(3):blk_str="ETX":Case chr(4):blk_str="EOT":Case chr(5):blk_str="ENQ":Case chr(6):blk_str="ACK":Case chr(7):blk_str="BEL":Case chr(8):blk_str="BS":Case chr(9):blk_str="HT":Case chr(10):blk_str="LF":Case chr(11):blk_str="VT":Case chr(12):blk_str="FF":Case chr(13):blk_str="CR":Case chr(14):blk_str="SO":Case chr(15):blk_str="SI":Case chr(16):blk_str="DLE":Case chr(17):blk_str="DC1":Case chr(18):blk_str="DC2":Case chr(19):blk_str="DC3":Case chr(20):blk_str="DC4":Case chr(21):blk_str="NAK":Case chr(22):blk_str="SYN":Case chr(23):blk_str="ETB":Case chr(24):blk_str="CAN":Case chr(25):blk_str="EM":Case chr(26):blk_str="SUB":Case chr(27):blk_str="ESC":Case chr(28):blk_str="FS":Case chr(29):blk_str="GS":Case chr(30):blk_str="RS":Case chr(31):blk_str="US":Case chr(127):blk_str="DEL":End Select:rmv_ctrl=blk_str:If IsNull(blk_str) OR IsEmpty(Blk_str) OR blk_str="" OR IsNumeric(Blk_str) Then:Else:rmv_ctrl=Replace(Replace(Replace(Replace(Replace(blk_str,"&","&amp;"),"  "," &nbsp;"),"""","&quot;"),"<","&lt;"),">","&gt;"): End If :End Function
Function cmd_b(blk_str):cmd_b="["&cmd_x(blk_str)&"], "&cmd_x("TypeName("&blk_str&")"):End Function
Function cmd_x(blk_str):On Error Resume Next:Dim xans, tmp:xans="":tmp="":execute "xans="&blk_str:If Err.Number <> 0  Then:xans=cmd_x("TypeName("&blk_str&")"):Select Case xans:Case 9::Case Else:xans="error":End Select:End If:If IsArray(xans)=False Then:cmd_x=rmv_ctrl(xans): Else:tmp=lst_arry(xans):cmd_x=trim(tmp):End If:End Function
Function lst_arry(blk_str):Dim tmp,i,q:q="""":tmp="":For i=0 to UBound(blk_str):if VarType(blk_str(i))>1 And VarType(blk_str(i))<6 Then:q="'":End If:tmp=tmp&" "&q&rmv_ctrl(blk_str(i))&q:Next:lst_arry=trim(tmp):End Function
</script>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
        <style type="text/css">
           i {display:table-row}
           u,b {display:table-cell}
        </style>
    </head>
    <body>
<%call printdata %>
    </body>
</html>
HTML Web Page Embedded Output:

©sideway

ID: 180400018 Last Updated: 4/18/2018 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019