faqts : Computers : Programming : Languages : Visual basic

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

35 of 41 people (85%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

What is a Static Declaration?

Jun 10th, 2000 21:10
Jerry Yoakum, Exam Cram: MS VB 5, Exam #70-165 - 157610236X


STATIC varname [(subscripts)] AS vartype [, ...]
Static is used to declare a variable at the procedure level. The 
variable retains its value as long as your program is running. It is 
otherwise identical to Dim except that the With Events clause is not 
supported.  Static can also be used to declare an entire procedure as 
being Static (for example: Static Sub main), in which case all 
variables within the procedure are also automatically Static.