R
RN1
Using Option Explicit necessitates that any variable used has to be
declared (Dimmed) explicitly but it DOESN'T necessitate that the
variable HAS TO BE DECLARED BEFORE the variable is used. For e.g. the
code below, which first uses the variable "str" & then declares it,
works fine:
===============================
<% Option Explicit %>
<%
str="Hello World"
Response.Write(str)
Dim str
%>
===============================
Why so? If I am not mistaken, usually it's the other way round with
other languages where variables have to be declared before they are
used. Correct me if I am wrong.
Thanks,
Ron
declared (Dimmed) explicitly but it DOESN'T necessitate that the
variable HAS TO BE DECLARED BEFORE the variable is used. For e.g. the
code below, which first uses the variable "str" & then declares it,
works fine:
===============================
<% Option Explicit %>
<%
str="Hello World"
Response.Write(str)
Dim str
%>
===============================
Why so? If I am not mistaken, usually it's the other way round with
other languages where variables have to be declared before they are
used. Correct me if I am wrong.
Thanks,
Ron