Static variables in VBS? 
Author Message
 Static variables in VBS?

Hi,

Coming from a 'proper' (gonna get flamed for that one, I can feel it :)
programming language background I was just wondering if there was any way to
have a static (or persistent) local variable in a VBScript sub or function

Thanks
Dave



Sun, 29 Sep 2002 03:00:00 GMT  
 Static variables in VBS?
No...  Does that mean VBScript isn't a "proper" programming language ;-)???

--
Michael Harris
MVP Scripting

Hi,

Coming from a 'proper' (gonna get flamed for that one, I can feel it :)
programming language background I was just wondering if there was any way to
have a static (or persistent) local variable in a VBScript sub or function

Thanks
Dave



Sun, 29 Sep 2002 03:00:00 GMT  
 Static variables in VBS?
Right, it is a Scripting language.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

On Wed, 12 Apr 2000 17:37:33 -0700, "Michael Harris"

Quote:

>No...  Does that mean VBScript isn't a "proper" programming language ;-)???



Mon, 30 Sep 2002 03:00:00 GMT  
 Static variables in VBS?
Yeah I know, but that would have been useful :(
Another global variable to the ever mounting list...

Just out of interest can it be done in VB?

Ta
Dave



Quote:
> Right, it is a Scripting language.

> Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

> On Wed, 12 Apr 2000 17:37:33 -0700, "Michael Harris"

> >No...  Does that mean VBScript isn't a "proper" programming language
;-)???



Mon, 30 Sep 2002 03:00:00 GMT  
 Static variables in VBS?
VB/VBA both support static variable declarations in procedures...

--
Michael Harris
MVP Scripting

Yeah I know, but that would have been useful :(
Another global variable to the ever mounting list...

Just out of interest can it be done in VB?

Ta
Dave



Quote:
> Right, it is a Scripting language.

> Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

> On Wed, 12 Apr 2000 17:37:33 -0700, "Michael Harris"

> >No...  Does that mean VBScript isn't a "proper" programming language
;-)???



Mon, 30 Sep 2002 03:00:00 GMT  
 Static variables in VBS?
No. But work around it using Cookies.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.



Quote:
>Yeah I know, but that would have been useful :(
>Another global variable to the ever mounting list...

>Just out of interest can it be done in VB?

>Ta
>Dave



>> Right, it is a Scripting language.

>> Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

>> On Wed, 12 Apr 2000 17:37:33 -0700, "Michael Harris"

>> >No...  Does that mean VBScript isn't a "proper" programming language
>;-)???



Tue, 01 Oct 2002 03:00:00 GMT  
 Static variables in VBS?
Thanks


Quote:
> VB/VBA both support static variable declarations in procedures...

> --
> Michael Harris
> MVP Scripting




Quote:
> Yeah I know, but that would have been useful :(
> Another global variable to the ever mounting list...

> Just out of interest can it be done in VB?

> Ta
> Dave



> > Right, it is a Scripting language.

> > Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

> > On Wed, 12 Apr 2000 17:37:33 -0700, "Michael Harris"

> > >No...  Does that mean VBScript isn't a "proper" programming language
> ;-)???



Tue, 01 Oct 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Static variable not static enough ???

2. Static variable?!

3. How to create a static variable?

4. Static Variables

5. Static Variable?!

6. How to set static user variable with VBScript

7. Adding new VPN users and assigning static IP addresses via VBS

8. How do I declare a static global variable ?

9. Static Class and Variable

10. Declaring variables as Static vs Private/Public -- XML

11. Static variables are not supported...

 

 
Powered by phpBB® Forum Software