Scope and lifetime of variables, Visual Basic Programming

Assignment Help:

The scope of a variable is finding out by where you declare it. While you declare a variable in a procedure, only code in that procedure can access or alter the value of that variable. It contain local scope and is called a procedure-level variable. If you declare a variable outside a process, you make it visible to all the process in your script. It is script-level variable, and it contain script-level scope.

How long a variable exists describe its lifetime. The lifetime of script-level variable extends from the time this is declared till the time the script is finished running. At process level, a variable exists only as long as you are in the process. While the procedure exits, the variable is destroyed. Local variables are ideal like temporary storage space while a process is executing. You can have local variables of the similar name in many different procedures because each is identified only by the process in which it is declared.


Related Discussions:- Scope and lifetime of variables

Document interfaces - visual basic programming, DOCUMENT INTERFACES   ...

DOCUMENT INTERFACES   A SDI (Single document interface) and the MDI (Multiple document interfaces) are the document interfaces. The MDI based applications can have numerous ch

Employee data, Part 1: Create an application that allows the user to enter ...

Part 1: Create an application that allows the user to enter the following employee data: First Name, Middle Name, Last Name, Employee Number, Department, Telephone Number, Telephon

Visual interface based on visual patterns , Visual Interface  Based On Vis...

Visual Interface  Based On Visual Patterns: The visual user interface should create recognizable patterns and text will be used for differentiating the objects with similar pa

#simple interest using pseudocode and flowcharts, simple interest using flo...

simple interest using flowchart and psuedocode using the formular s= x + nrx

To calculate rectangle, two sides are given of a sheet e.g 23*36 i want hal...

two sides are given of a sheet e.g 23*36 i want half or 1/2 of this sheet next i want 1/4(one fourth) of this sheet if sheet size is 23*36 next i want 1/8 similary as above

Executesql - database application, Executesql: The ExecuteSQL is used ...

Executesql: The ExecuteSQL is used for executing the query on the database. The CRecordset uses the RFX mechanism to replace data between field data members of the record set

Scope and lifetime of variables, The scope of a variable is finding out by ...

The scope of a variable is finding out by where you declare it. While you declare a variable in a procedure, only code in that procedure can access or alter the value of that varia

Appwizard, APPWIZARD   The Appwizard is a tool used for creating a p...

APPWIZARD   The Appwizard is a tool used for creating a project. It follows a series of steps to create a project. Steps Involved in Creating A Project: Step 1: Fr

Methods - vbscript dictionary object, Methods: VBScript Dictionary Object ...

Methods: VBScript Dictionary Object Method D escription Add Method Adds a key, item pair. Exists Method

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd