Chapter 5: Lists and Loops
nested loop
A loop inside the body of another loop.
infinite loop
A loop that does not end. Happens when the condition that will cause the end of a loop never occurs.
For...Next loop
A loop which executes a set of statements a fixed number of times.
pseudo-random numbers
A series of numbers generated by computer with apparent randomness.
iteration
A single pass through the statements in a loop.
pretest loop
Boolean expression tested first in this loop
Do Until loop
Executes until the condition becomes true
ListBox.Items.Add("Item")
Items.Add format
ListBox.Items.Clear( )
Items.Clear method format
ListBox.Items.Insert(Index, "Item")
Items.Insert method format
ListBox.Items.Remove(Item)
Items.Remove method format
ListBox.Items.RemoveAt(Index)
Items.RemoveAt method format
strUserInput = InputBox("Prompt.", "Input Needed.")
Write a statement that displays the input box.
NextDouble method
a Random class method that is used to get a random floating-point number between 0.0 and 1.0 (not including 1.0)
input box
a dialog box that pops up and prompts the user for input. (Prompt [, Title] [, Default])
property
a piece of data that determines some characteristic of the control
Next method
a random class method that is used to get a random integer number
Do While loop
a statement that indicates that as long as the associated expression is evaluated to "true" after the block, the following block should be executed in a looping manner; always executes at least once
running total
a sum of numbers that accumulates with each iteration of a loop
combo box
a text box that contains a predefined list of acceptable entries but permits the user to enter a new value when the list doesn't contain the desired value
counter
a variable that is regularly incremented or decremented each time a loop iterates
With...End With statement
allows you to simplify a series of consecutive statements that perform operations using same object
intNumEmployees = lstEmployees.Items.Count
assign the number of items in the list box to the variable intNumEmployees
Sorted property
cause items in the Items property to be displayed alphabetically
Items.Count property
determine the number of items stored in the listbox
ListBox control
displays a list of items and allows the user to select one or more items from the list
Items property
entries in a listbox are stored in this property
Items.Clear method
erases all the items in the Items property
Items.Insert method
insert an item at a specific position
method
procedures or functions that are members of a class; perform some operation on the data stored in the class
Items.Remove(At) method
remove one item from a listbox's Items property
loop/repetition structure
repeating structure that contains a block of program statements
Random object
represents the pseudo-random number generator in Visual Basic
IPmt function
returns the interest payment for a specific period on a loan
Pmt function
returns the periodic payment amount for a loan
PPmt function
returns the principal payment for a specific period on a loan
ToolTip control
standard way of providing help to the users of an application
posttest loop
statements in the body of the loop are executed first
conditionally executed statement
statements that are executed only when certain conditions exist; usually determined by the value of a Boolean expression
Exit Do statement
stops the execution of a Do While loop
Exit For statement
stops the execution of a For...Next loop
Items.Add method
store values in the Items property with code at runtime
SelectedIndex property
stores the index of the item selected in a list box
SelectedItem property
stores the value of the item selected in a list box
step value
the value added to the counter variable at the end of each iteration of a For...Next loop
seed value
used in the calculation that returns the next random number in the series
accumulator
variable that is used to accumulate the total of the numbers