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

Making decisions with select case, The Select Case structure provides an op...

The Select Case structure provides an option to If...Then...Else If for selectively executing one block of statements from amongst multiple blocks of statements. Any Select Case st

Data types - windows programming, Data types: The New data types were ...

Data types: The New data types were defined by using the typedef or #define statements. This was to allow the transition from 16 bit to 32 bit system. Some of the fresh data 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

Data types, what are the basic vb data types

what are the basic vb data types

Associating images to toolbars - visual basic, Associating Images to Toolba...

Associating Images to Toolbars: 1. Add an Image list to your form from the tool box. 2. Pick the custom property of the image list. 3. Click the images tab. 4. Select

ER DIAGRAM FOR DISTRIBUTER MANAGEMENT, HOW TO MAKE ER DIAGRAM FOR DISTRIBUT...

HOW TO MAKE ER DIAGRAM FOR DISTRIBUTER MANAGEMNET OF WATER PURIFIAR

Descriptive variable and procedure names, The body of variable or procedure...

The body of variable or procedure name must use mixed case and complete as essential to define its purpose. Additionally, procedure names must begin with a verb, such as CloseDialo

Calculating annual percent yield, I am having a hard time with calculating ...

I am having a hard time with calculating APY in my project. Every time I run the program my second APY is blank.

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

Coding, Write an event procedure to automate the billing system of a superm...

Write an event procedure to automate the billing system of a supermarket. Give the details of database tables, forms, controls and menu design (if any). Make assumptions, wherever

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