Everything is a variant in vbscript, so there is no Dim something AS
DATATYPE, just Dim something.

For scope, if you dim outside of any functions, subs, or classes, it will
have public scope. You can do "public x" if you like. If you dim a
variable in a routine, it will just have local scope.

Ray at work

"Dave Navarro" <dave@dave.dave> wrote in message
news:MPG.197e0d39ae1440ec989731@news-east.giganews.com...
> Is it possible to control variable types and scope in VBScript/ASP?
>
> For example, I want certain variables to be "global" to the page.
> Everything else I want to be local to the Function that it's located.
>
> I'm already using OPTION EXPLICIT.
>
> But I'm not sure how to specify variable "types" in VBScript. I tried:
>
> Dim x As Integer
>
> but I got an "Expected end of statement" error. Or is everything a
> variant and there's nothing I can do about it?
>
> Thanks!
>
> --Dave