[thelist] making the move from php to asp

Stephen Caudill SCaudill at municode.com
Fri Apr 16 07:38:25 CDT 2004

--------------- david.landy at somerfield.co.uk wrote: --------------- 
: <snip>
: - why declare a variable if you can't declare a type?
: </snip>
<snip />
: (If you set explicit on, then ASP will bleat that myver is
: undeclared.) 

I was waiting for that :)  Yes, of course you're right, and in practice,
this is why I always use Option Explicit.  Saved me many an hour in
debug time.  However, the point remains that I can return a record from
a database of type integer in a manner like this:

dim myInt
    myInt = rs("integerValue")

and do a comparison as such (this pisses me off too[1]):

if myInt = 9 then
  do fancy stuff
end if

I can still, seemingly randomly, get a type mismatch error.


[1] having the same operator for assignment and comparison is dumb.

More information about the thelist mailing list