Chapter 16 It is a common practice to begin a procedure name

subject Type Homework Help
subject Pages 4
subject Words 734
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 16: I Hear You Are Breaking Up (Sub Procedures)
TRUE/FALSE
1. An event procedure is a set of Visual Basic instructions that are processed when a specific event (such
as the Click event) occurs.
2. You can use an independent Sub procedure to avoid duplicating code when different sections of a
program need to perform the same task.
3. Independent Sub procedures are not used extensively in large and complex programs, which typically
are written by a team of programmers.
4. In a sub procedure, a set of parentheses that contains an optional procedure name follows the
parameter list in the procedure header.
5. You can invoke a Sub procedure using the Invoke statement.
6. Each argument represents an item of information that is passed to the procedure when the procedure is
invoked.
7. An independent Sub procedure can contain one or more parameters in its procedure header.
8. In a sub procedure, the number of arguments in the Call statement do not have to agree with the
number of parameters in the procedure list.
9. Every variable declared in an application has both a value and a unique address that represents the
location of the variable in the computer’s internal memory.
10. When only the contents of a variable are passed, the receiving procedure is given access to the variable
in memory.
page-pf2
11. When only a copy of the contents of a variable are passed, the receiving procedure can change the
value stored inside the variable.
12. When you select a check box, for example, its Checked property changes from False to True.
13. A procedure-level variable is removed from the computer’s memory when the procedure in which it is
declared ends.
14. To pass a variable by reference in Visual Basic, you include the keyword ByRef before the variable’s
corresponding parameter in the receiving procedure’s header.
15. When you pass a variable’s address to a procedure, the computer uses the address to locate the variable
in its external memory.
MULTIPLE CHOICE
1. The ____ provides a code template for every event procedure.
a.
Code Editor
c.
Code Template
b.
Template Editor
d.
Template Tool
2. It is a common practice to begin a procedure name with a verb and to enter the name using ____ case.
a.
Camel
c.
Pascal
b.
Hungarian
d.
Capitalized
3. ____ store the information passed to a procedure when it is invoked.
a.
Data stores
c.
Variables
b.
Controls
d.
Parameters
4. Unlike the procedure header, which varies with each procedure, the procedure footer for an
independent Sub procedure is always ____.
a.
End
c.
Sub Foot
b.
End Sub
d.
Foot Sub
5. Each parameter stores information that is passed to an independent Sub procedure by the ____
statement.
a.
Call
c.
Send
page-pf3
b.
Pass
d.
Go
6. The parameters in a procedure header have ____ scope, which means they can be used only by the
procedure in which they are declared.
a.
local
c.
procedure
b.
limited
d.
specific
7. A text box’s ____ event occurs whenever a change is made to the contents of the text box.
a.
TextModified
c.
CheckedChanged
b.
TextChanged
d.
ChangedText
8. Passing a variables address is referred to as passing by ____.
a.
address
c.
reference
b.
value
d.
location
9. You pass a variable by ____ when the receiving procedure needs to know the variable’s contents, but
the receiving procedure does not need to change the contents.
a.
reference
c.
value
b.
address
d.
location
10. To pass a variable by value in Visual Basic, you include the keyword ____ before the name of its
corresponding parameter in the receiving procedure’s parameterList.
a.
Val
c.
Value
b.
ByVal
d.
ByValue
11. When you pass a variable by ____, the computer passes a copy of the variable’s contents to the
receiving procedure.
a.
value
c.
location
b.
contents
d.
reference
12. Radio buttons and check boxes have a ____ event that occurs when the value in the control’s Checked
property changes.
a.
CheckedChanged
c.
ChangedChecked
b.
TextChanged
d.
TextChecked
13. When you pass a variable by reference, you pass its ____ in the computer’s internal memory.
a.
value
c.
name
b.
data
d.
location
page-pf4
14. You pass a variable by ____ when you want the receiving procedure to change the contents of the
variable.
a.
content
c.
value
b.
name
d.
reference
15. The ____ keyword tells the computer to pass the variable’s address rather than a copy of its contents.
a.
ByRef
c.
ByValue
b.
ByVal
d.
ByLoc

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.