Deck 17: Talk to Me Function Procedures
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
Play
Full screen (f)
Deck 17: Talk to Me Function Procedures
1
A(n) ____ procedure does not return a value.
A) Sub
C) Assignment
B) function
D) static
A) Sub
C) Assignment
B) function
D) static
A
2
If the function returns a string, you enter ____ at the end of the header.
A) String As
C) As String
B) (String)
D) Type As StringType
A) String As
C) As String
B) (String)
D) Type As StringType
C
3
You use the ____ section of the function's header to specify the data type of the value returned by the function.
A) Like
C) Type
B) Dim
D) As dataType
A) Like
C) Type
B) Dim
D) As dataType
D
4
A(n) ____ procedure returns a value after performing its assigned task.
A) return
C) function
B) sub
D) assignment
A) return
C) function
B) sub
D) assignment
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
The header and footer in a function are identical to the header and footer in a sub procedure.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
Most programmers pass a variable by reference only when a procedure needs to produce more than one result.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
The function's header and footer contain the ____ keyword.
A) Sub
C) SubFunction
B) FunctionProcedure
D) Function
A) Sub
C) SubFunction
B) FunctionProcedure
D) Function
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
Allowing more than one procedure to change the contents of a memory location can lead to subtle errors that are difficult to find, especially in large applications.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
A Sub procedure's header includes the As dataType section.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
If the function returns a Double number, you enter ____ at the end of the header.
A) Number Double
C) (Double)
B) As Double
D) Type as DoubleType(Double)
A) Number Double
C) (Double)
B) As Double
D) Type as DoubleType(Double)
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
The statement that invokes a function will always assign the function's return value to a variable.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
The sub procedure's header and footer contain the ____ keyword.
A) Sub
C) SubProcedure
B) Function
D) Subroutine
A) Sub
C) SubProcedure
B) Function
D) Subroutine
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
In most cases, the last statement within a function is Update expression.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
When changing the Sub keyword in a header to Function, the Code Editor automatically changes the Sub keyword in the footer to the Function keyword.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
As is true with a Sub procedure, a function can receive information either by value or by reference.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
After creating a function, you can invoke it from one or more places in an application's code.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
A ____'s header includes the As dataType section.
A) procedure
C) caller
B) function
D) program
A) procedure
C) caller
B) function
D) program
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
You invoke a function that you create in exactly the same way as you invoke one of Visual Basic's built-in functions.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
Fewer unintentional errors occur in applications when memory locations have the maximum scope needed.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
Function procedures are referred to more simply as structures.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
The information a function receives is listed in the ____ in the header.
A) parameterList
C) return type
B) data type
D) function name
A) parameterList
C) return type
B) data type
D) function name
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
Like sub procedure names, function names typically begin with a(n) ____.
A) noun
C) adjective
B) verb
D) adverb
A) noun
C) adjective
B) verb
D) adverb
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
You know that a variable is passed by value when the keyword ____ appears before the parameter in the function's header.
A) ByRef
C) ByVal
B) ByValue
D) ByReference
A) ByRef
C) ByVal
B) ByValue
D) ByReference
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
A ____ under a variable in the Code Editor window indicates that it has not been declared.
A) bold color
C) green color
B) jagged line
D) dashed line
A) bold color
C) green color
B) jagged line
D) dashed line
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
In a function, the data type of the expression in the Return statement must agree with the data type specified in the ____ section of the header.
A) Type As dataType
C) As dataType (Return)
B) Return As dataType
D) As dataType
A) Type As dataType
C) As dataType (Return)
B) Return As dataType
D) As dataType
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck