VB NOTES PART 10

VB NOTES PART 10 - 3/1----Scope Variables can be referenced...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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.

Page1 / 3

VB NOTES PART 10 - 3/1----Scope Variables can be referenced...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online