Deck 9: Sub and Function Procedures

ملء الشاشة (f)
exit full mode
سؤال
Passing a variable's address to the receiving procedure is referred to as passing by ____.

A) address
B) parameter
C) reference
D) value
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A(n) ____ Sub procedure is processed only when called (invoked) from code.

A) independent
B) event
C) parameterized
D) modular
سؤال
In most cases, the procedure header begins with the ____ keyword.

A) Public
B) Private
C) Sub
D) Call
سؤال
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
سؤال
You cannot pass information to a function by reference.
سؤال
The parameterList lists the data type and name of one or more memory locations, called ____.

A) functions
B) parameters
C) clauses
D) constants
سؤال
Procedure names are usually entered using ____.

A) Top case
B) Fermi case
C) Pascal case
D) Hill case
سؤال
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
سؤال
When you pass a variable by value, the receiving procedure can change the value stored inside the variable.
سؤال
Unlike a Sub procedure header, a function's header includes the ____ section.

A) Handles
B) ByVal
C) As datatype
D) ByRef
سؤال
The position of the arguments listed in the calling statement should agree with the position of the parameters listed in the receiving procedure's _____.

A) variables
B) parameterList
C) Return statement
D) arguments
سؤال
The number of arguments in the Call statement's argumentList should agree with the number of parameters in the procedure's parameterList .
سؤال
You can invoke an independent Sub procedure using the ____ statement.

A) event
B) parameter
C) method
D) calling
سؤال
After creating your own function in Visual Basic, you can invoke it from one or more places in an application's code.
سؤال
The rules for naming an independent Sub procedure are the same as those for naming variables.
سؤال
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
سؤال
The process of manually walking through your code, using sample data is called ____.

A) prototyping
B) desk-checking
C) screening
D) reviewing
سؤال
The procedure footer for a Sub procedure is always ____.

A) Private Sub
B) End Case
C) Exit Sub
D) End Sub
سؤال
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(n) ____ procedure returns a value after performing its assigned task.

A) Argument
B) Function
C) Parameter
D) Sub
سؤال
The function's header and footer contain the ____ keyword.

A) Sub
B) Funct
C) Return
D) Function
سؤال
When you pass a variable ____________________, the computer passes a copy of the variable's contents to the receiving procedure.
سؤال
What kind of access to a variable does the receiving procedure have when the variable is passed to it by value?
سؤال
What is desk-checking?
سؤال
You can use the ____ function to return a number rounded to a specific number of decimal places.

A) Round
B) Math.Round
C) Round.Math
D) Math.Digits
سؤال
The last statement in a function is typically the ____________________.
سؤال
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.
سؤال
What is the difference between Sub procedures and Function procedures?
سؤال
What is an independent Sub procedure?
سؤال
What are two reasons for using independent Sub procedures in code?
سؤال
You can cast a variable from the Object data type to a different data type by using the ____operator.

A) TryType
B) CastType
C) TryCast
D) Cast
سؤال
What are the rules for naming an independent Sub procedure?
سؤال
The process of converting a variable from one data type to another is referred to as ____.

A) casting
B) changing
C) transferring
D) translating
سؤال
Variables declared using the ____ data type do not have a set of properties.

A) Object
B) Integer
C) Double
D) String
سؤال
On what basis should you decide whether you should pass a variable's value or address to the receiving procedure?
سؤال
Associating a procedure with more than one object and event allows the programmer to avoid  ____________________ code in different parts of the program..
سؤال
What is an event procedure?
سؤال
How do you invoke a function that you have created?
سؤال
Desk‑checking is also called ____________________ because you use a pencil and paper to follow each of the instructions by hand.
سؤال
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
سؤال
Match between columns
Returns a value after performing its assigned task
Sub procedure
Returns a value after performing its assigned task
Function procedure
Returns a value after performing its assigned task
parameter
Returns a value after performing its assigned task
address
Returns a value after performing its assigned task
As datatype clause
Returns a value after performing its assigned task
Return statement
Returns a value after performing its assigned task
hand-tracing
Returns a value after performing its assigned task
independent Sub procedure
Returns a value after performing its assigned task
Calling statement
The last statement within a function
Sub procedure
The last statement within a function
Function procedure
The last statement within a function
parameter
The last statement within a function
address
The last statement within a function
As datatype clause
The last statement within a function
Return statement
The last statement within a function
hand-tracing
The last statement within a function
independent Sub procedure
The last statement within a function
Calling statement
Does not return a value after performing its assigned task
Sub procedure
Does not return a value after performing its assigned task
Function procedure
Does not return a value after performing its assigned task
parameter
Does not return a value after performing its assigned task
address
Does not return a value after performing its assigned task
As datatype clause
Does not return a value after performing its assigned task
Return statement
Does not return a value after performing its assigned task
hand-tracing
Does not return a value after performing its assigned task
independent Sub procedure
Does not return a value after performing its assigned task
Calling statement
Used to invoke an independent Sub procedure
Sub procedure
Used to invoke an independent Sub procedure
Function procedure
Used to invoke an independent Sub procedure
parameter
Used to invoke an independent Sub procedure
address
Used to invoke an independent Sub procedure
As datatype clause
Used to invoke an independent Sub procedure
Return statement
Used to invoke an independent Sub procedure
hand-tracing
Used to invoke an independent Sub procedure
independent Sub procedure
Used to invoke an independent Sub procedure
Calling statement
Reviewing the program instructions
Sub procedure
Reviewing the program instructions
Function procedure
Reviewing the program instructions
parameter
Reviewing the program instructions
address
Reviewing the program instructions
As datatype clause
Reviewing the program instructions
Return statement
Reviewing the program instructions
hand-tracing
Reviewing the program instructions
independent Sub procedure
Reviewing the program instructions
Calling statement
Location in the computer's internal memory
Sub procedure
Location in the computer's internal memory
Function procedure
Location in the computer's internal memory
parameter
Location in the computer's internal memory
address
Location in the computer's internal memory
As datatype clause
Location in the computer's internal memory
Return statement
Location in the computer's internal memory
hand-tracing
Location in the computer's internal memory
independent Sub procedure
Location in the computer's internal memory
Calling statement
Used to specify the data type of the value returned by the function
Sub procedure
Used to specify the data type of the value returned by the function
Function procedure
Used to specify the data type of the value returned by the function
parameter
Used to specify the data type of the value returned by the function
address
Used to specify the data type of the value returned by the function
As datatype clause
Used to specify the data type of the value returned by the function
Return statement
Used to specify the data type of the value returned by the function
hand-tracing
Used to specify the data type of the value returned by the function
independent Sub procedure
Used to specify the data type of the value returned by the function
Calling statement
Allows the programmer to avoid duplicating code in different sections of a program
Sub procedure
Allows the programmer to avoid duplicating code in different sections of a program
Function procedure
Allows the programmer to avoid duplicating code in different sections of a program
parameter
Allows the programmer to avoid duplicating code in different sections of a program
address
Allows the programmer to avoid duplicating code in different sections of a program
As datatype clause
Allows the programmer to avoid duplicating code in different sections of a program
Return statement
Allows the programmer to avoid duplicating code in different sections of a program
hand-tracing
Allows the programmer to avoid duplicating code in different sections of a program
independent Sub procedure
Allows the programmer to avoid duplicating code in different sections of a program
Calling statement
Stores information passed to a procedure when it is invoked
Sub procedure
Stores information passed to a procedure when it is invoked
Function procedure
Stores information passed to a procedure when it is invoked
parameter
Stores information passed to a procedure when it is invoked
address
Stores information passed to a procedure when it is invoked
As datatype clause
Stores information passed to a procedure when it is invoked
Return statement
Stores information passed to a procedure when it is invoked
hand-tracing
Stores information passed to a procedure when it is invoked
independent Sub procedure
Stores information passed to a procedure when it is invoked
Calling statement
سؤال
What is the TryCast operator use for?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 9: Sub and Function Procedures
1
Passing a variable's address to the receiving procedure is referred to as passing by ____.

A) address
B) parameter
C) reference
D) value
C
2
A(n) ____ Sub procedure is processed only when called (invoked) from code.

A) independent
B) event
C) parameterized
D) modular
A
3
In most cases, the procedure header begins with the ____ keyword.

A) Public
B) Private
C) Sub
D) Call
B
4
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
5
You cannot pass information to a function by reference.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
6
The parameterList lists the data type and name of one or more memory locations, called ____.

A) functions
B) parameters
C) clauses
D) constants
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
7
Procedure names are usually entered using ____.

A) Top case
B) Fermi case
C) Pascal case
D) Hill case
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
8
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
9
When you pass a variable by value, the receiving procedure can change the value stored inside the variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
10
Unlike a Sub procedure header, a function's header includes the ____ section.

A) Handles
B) ByVal
C) As datatype
D) ByRef
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
11
The position of the arguments listed in the calling statement should agree with the position of the parameters listed in the receiving procedure's _____.

A) variables
B) parameterList
C) Return statement
D) arguments
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
12
The number of arguments in the Call statement's argumentList should agree with the number of parameters in the procedure's parameterList .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
13
You can invoke an independent Sub procedure using the ____ statement.

A) event
B) parameter
C) method
D) calling
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
14
After creating your own function in Visual Basic, you can invoke it from one or more places in an application's code.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
15
The rules for naming an independent Sub procedure are the same as those for naming variables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
16
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
17
The process of manually walking through your code, using sample data is called ____.

A) prototyping
B) desk-checking
C) screening
D) reviewing
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
18
The procedure footer for a Sub procedure is always ____.

A) Private Sub
B) End Case
C) Exit Sub
D) End Sub
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
19
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
20
A(n) ____ procedure returns a value after performing its assigned task.

A) Argument
B) Function
C) Parameter
D) Sub
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
21
The function's header and footer contain the ____ keyword.

A) Sub
B) Funct
C) Return
D) Function
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
22
When you pass a variable ____________________, the computer passes a copy of the variable's contents to the receiving procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
23
What kind of access to a variable does the receiving procedure have when the variable is passed to it by value?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
24
What is desk-checking?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
25
You can use the ____ function to return a number rounded to a specific number of decimal places.

A) Round
B) Math.Round
C) Round.Math
D) Math.Digits
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
26
The last statement in a function is typically the ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
27
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
28
What is the difference between Sub procedures and Function procedures?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
29
What is an independent Sub procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
30
What are two reasons for using independent Sub procedures in code?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
31
You can cast a variable from the Object data type to a different data type by using the ____operator.

A) TryType
B) CastType
C) TryCast
D) Cast
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
32
What are the rules for naming an independent Sub procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
33
The process of converting a variable from one data type to another is referred to as ____.

A) casting
B) changing
C) transferring
D) translating
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
34
Variables declared using the ____ data type do not have a set of properties.

A) Object
B) Integer
C) Double
D) String
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
35
On what basis should you decide whether you should pass a variable's value or address to the receiving procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
36
Associating a procedure with more than one object and event allows the programmer to avoid  ____________________ code in different parts of the program..
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
37
What is an event procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
38
How do you invoke a function that you have created?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
39
Desk‑checking is also called ____________________ because you use a pencil and paper to follow each of the instructions by hand.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
40
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
Returns a value after performing its assigned task
Sub procedure
Returns a value after performing its assigned task
Function procedure
Returns a value after performing its assigned task
parameter
Returns a value after performing its assigned task
address
Returns a value after performing its assigned task
As datatype clause
Returns a value after performing its assigned task
Return statement
Returns a value after performing its assigned task
hand-tracing
Returns a value after performing its assigned task
independent Sub procedure
Returns a value after performing its assigned task
Calling statement
The last statement within a function
Sub procedure
The last statement within a function
Function procedure
The last statement within a function
parameter
The last statement within a function
address
The last statement within a function
As datatype clause
The last statement within a function
Return statement
The last statement within a function
hand-tracing
The last statement within a function
independent Sub procedure
The last statement within a function
Calling statement
Does not return a value after performing its assigned task
Sub procedure
Does not return a value after performing its assigned task
Function procedure
Does not return a value after performing its assigned task
parameter
Does not return a value after performing its assigned task
address
Does not return a value after performing its assigned task
As datatype clause
Does not return a value after performing its assigned task
Return statement
Does not return a value after performing its assigned task
hand-tracing
Does not return a value after performing its assigned task
independent Sub procedure
Does not return a value after performing its assigned task
Calling statement
Used to invoke an independent Sub procedure
Sub procedure
Used to invoke an independent Sub procedure
Function procedure
Used to invoke an independent Sub procedure
parameter
Used to invoke an independent Sub procedure
address
Used to invoke an independent Sub procedure
As datatype clause
Used to invoke an independent Sub procedure
Return statement
Used to invoke an independent Sub procedure
hand-tracing
Used to invoke an independent Sub procedure
independent Sub procedure
Used to invoke an independent Sub procedure
Calling statement
Reviewing the program instructions
Sub procedure
Reviewing the program instructions
Function procedure
Reviewing the program instructions
parameter
Reviewing the program instructions
address
Reviewing the program instructions
As datatype clause
Reviewing the program instructions
Return statement
Reviewing the program instructions
hand-tracing
Reviewing the program instructions
independent Sub procedure
Reviewing the program instructions
Calling statement
Location in the computer's internal memory
Sub procedure
Location in the computer's internal memory
Function procedure
Location in the computer's internal memory
parameter
Location in the computer's internal memory
address
Location in the computer's internal memory
As datatype clause
Location in the computer's internal memory
Return statement
Location in the computer's internal memory
hand-tracing
Location in the computer's internal memory
independent Sub procedure
Location in the computer's internal memory
Calling statement
Used to specify the data type of the value returned by the function
Sub procedure
Used to specify the data type of the value returned by the function
Function procedure
Used to specify the data type of the value returned by the function
parameter
Used to specify the data type of the value returned by the function
address
Used to specify the data type of the value returned by the function
As datatype clause
Used to specify the data type of the value returned by the function
Return statement
Used to specify the data type of the value returned by the function
hand-tracing
Used to specify the data type of the value returned by the function
independent Sub procedure
Used to specify the data type of the value returned by the function
Calling statement
Allows the programmer to avoid duplicating code in different sections of a program
Sub procedure
Allows the programmer to avoid duplicating code in different sections of a program
Function procedure
Allows the programmer to avoid duplicating code in different sections of a program
parameter
Allows the programmer to avoid duplicating code in different sections of a program
address
Allows the programmer to avoid duplicating code in different sections of a program
As datatype clause
Allows the programmer to avoid duplicating code in different sections of a program
Return statement
Allows the programmer to avoid duplicating code in different sections of a program
hand-tracing
Allows the programmer to avoid duplicating code in different sections of a program
independent Sub procedure
Allows the programmer to avoid duplicating code in different sections of a program
Calling statement
Stores information passed to a procedure when it is invoked
Sub procedure
Stores information passed to a procedure when it is invoked
Function procedure
Stores information passed to a procedure when it is invoked
parameter
Stores information passed to a procedure when it is invoked
address
Stores information passed to a procedure when it is invoked
As datatype clause
Stores information passed to a procedure when it is invoked
Return statement
Stores information passed to a procedure when it is invoked
hand-tracing
Stores information passed to a procedure when it is invoked
independent Sub procedure
Stores information passed to a procedure when it is invoked
Calling statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
42
What is the TryCast operator use for?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.