Ask a Question related to ASP Database, Design and Development.
-
Ray at #1
Re: Variable Type and Scope
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
Ray at Guest
-
PHP variable scope bug in CT
I have a page where I declare PHP variables which are then used inside an include file. When I try to edit the page in Contribute, I get a notice... -
Variable scope
What type of variable can you use that lasts between page refreshes is it possible or do i have to use session or a hidden field thanks -
[PHP-DEV] Variable Scope
Variable scope is mediocre at best. For instances: $array = array(1, 2, 3, 4, 5); for ($i = 0; $i < 5; $i++) { $num = $array; echo $num;... -
Re[2]: [PHP-DEV] Variable Scope
Hello LingWitt, - PHP is typeless - for doesn't span any declaration level and hence does not have its own symbol table - PHP is not c, not C++... -
variable scope in c#
I'm calling this procedure from a custom validator OnServerValidate event. I keep getting the error : Use of unassigned local variable...



Reply With Quote

