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

Features of user interface design, FEATURES OF USER INTERFACE DESIGN Th...

FEATURES OF USER INTERFACE DESIGN The features like how will the software's are used? Who will be the users? What will be the life of the software? During its lifetime how ofte

Program to draw a rectangle shape , Create a project that draw a rectangle ...

Create a project that draw a rectangle shape which may be either (*) or (+) according to the selected radio button. The number of rows in the shape will be taken from the 1 st

Cdatabase class - database application, Cdatabase Class: The CDataBase...

Cdatabase Class: The CDataBase class helps to connect to the data source. The Open member function opens a connection to the data source. CRecordset class is used for performi

MATHEMATICS PROJECT, HOW TO SOLVE ORDINARY DIFFERENTIAL EQUETION IN VISUAL ...

HOW TO SOLVE ORDINARY DIFFERENTIAL EQUETION IN VISUAL BASIC PROGRAMMING

Function procedures - vbscript, This is a series of VBScript statements enc...

This is a series of VBScript statements enclosed through the Function & End Function statements. A Function procedure is same to a Sub procedure, however can also return a value. T

Switch 2 images, I have a problem with Visual Basic: exchangeable 2 image...

I have a problem with Visual Basic: exchangeable 2 images of place I have 2 picturebox''s placed a button when I click on the button, the 2 pictures of this place change with e

Vb program for simple image processing, A program needs to be written that ...

A program needs to be written that is capable of simple image processing. All the images that are available for you to use, can be found on Blackboard in the Assignments section. T

Creating constants in vbscript, In VBScript, You create user-defined consta...

In VBScript, You create user-defined constants using the Const statement. It lets you create string or numeric constants along with meaningful names and let you to assign them lite

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