Hi there,
there are some major dif when it comes to vb and vbscript.. heard of eplicit and implicit before? sounds weird ah? :)
option explicit
-- every variable used within a particular scope must be declared with a proper datatype assignment
option implicit
-- variable need or need not to be declared to matching datatype assignment at all
vb vs. vbscript
-- with vb you have an option to declare or not to declare variable with proper datatype assignment
-- with vb script you still have an option, but this time proper datatype assignment is not a must
confused ah?
well.. refer to sample code segment below.. take care my fren..
in vb with option explicit
-
Option Explicit
-
-
Dim Str as String
-
Dim nCount as Integer
-
-
Str = Trim(Me.Text1.Text)
-
nCount = Val(Me.Text2.Text)
-
in vb with option implicit
-
Option Implicit
-
-
Str = Trim(Me.Text1.Text)
-
nCount = Val(Me.Text2.Text)
-
in vbscript with option explicit
-
Option Explicit
-
-
Dim Str
-
Dim nCount
-
-
Str = Trim(Request.Form("txtName"))
-
nCount = Val(Request.Form("txtCount"))
-
in vbscript with option implicit
-
Option Implicit
-
-
Str = Trim(Request.Form("txtName"))
-
nCount = Val(Request.Form("txtCount"))
-