This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 3/1----Scope Variables can be referenced form limited parts of an application. The scope of a variable is the part of the application where it is visible Class Dim x Sub Sub Dim y For.. Dim Z. Function.-----Module scope Any procedure in the class can access Declared inside class, outside any procedure---------(X) which is called instance variables Scope goes from Class to End Class-----Procedure Scope Declared inside procedure (inside Sub, Function), outside any control structure (Y) Can be referenced anywhere inside procedure, nowhere outside. Parameters have procedure scope-----Block scope Declared inside some control structure Visible only the control structure If test >= 10 then Dim count as integer For count=1 To 10 . Next End if-------Local variables Procedure or block scope If local variable has the same name as instance variable (Dim X in the Function box above) Instance variable is hidden within local variables scope-----not recommended because its confusing...
View Full Document
This note was uploaded on 12/01/2011 for the course 6K 226 taught by Professor Staff during the Fall '10 term at University of Iowa.
- Fall '10