Deck 8: Sub and Function Procedures
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
العب
ملء الشاشة (f)
Deck 8: Sub and Function Procedures
1
All event procedures contain the ____ parameters in their procedure header.
A) thrower and f
B) e and system
C) sender and e
D) title and e
A) thrower and f
B) e and system
C) sender and e
D) title and e
C
2
The rules for naming an independent Sub procedure are the same as those for naming variables.
True
3
In most cases, the procedure header begins with the ____ keyword.
A) Public
B) Private
C) Sub
D) Call
A) Public
B) Private
C) Sub
D) Call
B
4
You cannot pass information to a function by reference.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
You pass a variable by ____ when you want the receiving procedure to change the contents of the variable.
A) value
B) memory
C) name
D) reference
A) value
B) memory
C) name
D) reference
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
A(n) ____ Sub procedure is processed only when called (invoked) from code.
A) independent
B) event
C) parameterized
D) modular
A) independent
B) event
C) parameterized
D) modular
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Procedure names are usually entered using ____.
A) Top case
B) Worm case
C) Pascal case
D) Hill case
A) Top case
B) Worm case
C) Pascal case
D) Hill case
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
The ____ keyword tells the computer to pass the variable's address rather than a copy of its contents.
A) ByName
B) ByMem
C) ByRef
D) ByVal
A) ByName
B) ByMem
C) ByRef
D) ByVal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
The procedure footer for a Sub procedure is always ____.
A) Private Sub
B) End Case
C) Exit Sub
D) End Sub
A) Private Sub
B) End Case
C) Exit Sub
D) End Sub
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
After creating your own function in Visual Basic, you can invoke it from one or more places in an application's code.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
The ____ parameter in an event procedure's header contains additional information provided by the object that raised the event.
A) sender
B) e
C) event
D) click
A) sender
B) e
C) event
D) click
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
When you pass a variable by value, the receiving procedure can change the value stored inside the variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
The ____ parameter of an event procedure contains the memory address of the object that raised the event.
A) sender
B) e
C) event
D) click
A) sender
B) e
C) event
D) click
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
To pass a variable by value, you include the keyword ____ before the name of its corresponding parameter in the procedure's parameterList.
A) ByRef
B) ByVal
C) ByValue
D) ByName
A) ByRef
B) ByVal
C) ByValue
D) ByName
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
You can invoke an independent Sub procedure using the ____ statement.
A) Event
B) Parameter
C) Method
D) Call
A) Event
B) Parameter
C) Method
D) Call
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
The number of arguments in the Call statement's argumentList should agree with the number of parameters in the procedure's parameterList.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
The ____ clause in an event procedure's header indicates the object and event associated with the procedure.
A) Call
B) ByVal
C) ByRef
D) Handles
A) Call
B) ByVal
C) ByRef
D) Handles
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
The ____ parameter in the KeyPress event procedure's header contains a character that corresponds to the key pressed by the user.
A) sender
B) e
C) Handles
D) As
A) sender
B) e
C) Handles
D) As
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Passing a variable's address to the receiving procedure is referred to as passing by ____.
A) address
B) parameter
C) reference
D) value
A) address
B) parameter
C) reference
D) value
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
The parameterList lists the data type and name of one or more memory locations, called ____.
A) functions
B) parameters
C) clauses
D) constants
A) functions
B) parameters
C) clauses
D) constants
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
Match each item with a statement below.
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Returns a value after performing its assigned task
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Returns a value after performing its assigned task
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
To pass a variable by reference in Visual Basic, you include the keyword ____________________ before the variable's corresponding parameter in the receiving procedure's header.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
Match each item with a statement below.
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Allows the programmer to avoid duplicating code in different sections of a program
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Allows the programmer to avoid duplicating code in different sections of a program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
Associating a procedure with more than one object and event allows the programmer to avoid ____________________ code in different parts of the program..
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
Match each item with a statement below.
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Stores information passed to a procedure when it is invoked
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Stores information passed to a procedure when it is invoked
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Match each item with a statement below.
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Location in the computer's internal memory
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Location in the computer's internal memory
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
A(n) ____ occurs each time an interval has elapsed.
A) Interval event
B) Tick Event
C) Click event
D) Timer event
A) Interval event
B) Tick Event
C) Click event
D) Timer event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
Match each item with a statement below.
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
The last statement within a function
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
The last statement within a function
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
The function's header and footer contain the ____ keyword.
A) Sub
B) Funct
C) Return
D) Function
A) Sub
B) Funct
C) Return
D) Function
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
Match each item with a statement below.
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Used to specify the data type of the value returned by the function
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Used to specify the data type of the value returned by the function
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
Unlike a Sub procedure header, a function's header includes the ____ section.
A) Handles
B) ByVal
C) As datatype
D) ByRef
A) Handles
B) ByVal
C) As datatype
D) ByRef
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
The process of converting a variable from one data type to another is referred to as ____.
A) casting
B) changing
C) transferring
D) translating
A) casting
B) changing
C) transferring
D) translating
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
The last statement in a function is typically the ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
Procedure names are usually entered using ____________________ case.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
The Return statement's syntax is ____ expression, where expression represents the one and only value that will be returned to the statement invoking the function.
A) Return
B) Send
C) Handles
D) As
A) Return
B) Send
C) Handles
D) As
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
When you pass a variable ____________________, the computer passes a copy of the variable's contents to the receiving procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
Match each item with a statement below.
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Used to invoke an independent Sub procedure
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Used to invoke an independent Sub procedure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
A(n) ____ procedure returns a value after performing its assigned task.
A) Argument
B) Function
C) Parameter
D) Event
A) Argument
B) Function
C) Parameter
D) Event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
Match each item with a statement below.
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Does not return a value after performing its assigned task
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
Does not return a value after performing its assigned task
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
Match each item with a statement below.
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
A Sub procedure that is associated with a specific object and event
a.Return statement
f.parameter
b.address
g.event procedure
c.Call statement
h.As datatype clause
d.independent Sub procedure
i.Sub procedure
e.Function procedure
A Sub procedure that is associated with a specific object and event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
What is the difference between Sub procedures and Function procedures?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
What is the purpose of a timer control?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
What are two reasons for using independent Sub procedures in code?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
What is an event procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
What are the rules for naming an independent Sub procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
What is an independent Sub procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
How do you invoke a function that you have created?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
How do you view the properties of an event procedure's e parameter?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
On what basis should you decide whether you should pass a variable's value or address to the receiving procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
What kind of access to a variable does the receiving procedure have when the variable is passed to it by value?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck