New Exam Revision Flashcards
A parameter is:
A placeholder for data passed to a sub-routine or function.
Machine code is:
The output of the compiler.
The scope of a private sub is:
The sub routine can only be used by this form (or class)
A group of objects or variables all having the same name are:
An array.
The symbol “=” means.
Is identical to or takes value of.
On a form of entering students grades which control type should be used to get the students name.
Text box.
On a form for entering personal preferences, which control type type should be used to indicate favourite foods.
Check box
Which control type should be used to select the gender of an individual.
List box
The properties of a control do bit determine the controls movements:
Movement
When writing the command public sub means that
This subroutine is available to forms and classes Ina program.
What is the difference between the Text and Name properties of a control?
Text is what you write in the box that will show up when the program runs. Name is the name of the control that shows up in the code
What would you name a textbox that was used to enter a person’s name?
txt.Name
What is special about declaring a variable with Static?
Eg. Static iCounter as Integer = 0
It retains the variable in the code for subsequent calls to the sub-routine or function.
What does the scope of a variable refer to?
It reefers to where the variable can be used or seen by the program.
How would you declare a variable such as PI in a program and how does this differ from other variables?
Declare as a constant and can only be changed in the declaration statement.
Explain what a function is.
A piece of code in a program that when called performs an operation and returns a value to the calling code.
- What sort of loop would you use to execute a section of code a set number of times?
For i as Integer = 1 to 10
Next
What sort of loop would you use to execute a section of code at least once?
Do until
- What sort of loop would you use to execute a section of code zero or more times?
While tank is not fuel add one litre
End while
Write the code to declare an integer variable with an initial value of 15 and describe what each word or value in the declaration means.
Dim iNumber as Integer = 15
Dim: keyword for declaration
iNumber: a meaningful name with datatype prefix
Local variable
When declared in a program this variable can only be seen and used within the sub routine or function where it is declared
Form level
When declared in a program this variable can be seen by all sub routines and functions in the program.
Source code
The code written by the programmer using a programming language.