Chapter 4 - 5 Flashcards
ANSI, ANSCII
The value of each character produced by a keyboard
Relational Operators
Symbol Numeric String Date
= equal to identical to same as
< > not equal to different from different than
< less than precedes precedes alphabetically chronologically > greater than follows follows alphabetically chronologically
= greater than follows follows
or equal to alphabetically chronologically
or is identical to or the same as
Logical Operators
cond1 And cond2
is true if both cond1 and cond2 are true. Otherwise, it is false.
cond1 Or cond2
is true if either cond1 or cond2 (or both) is true. Otherwise, it is false.
Not cond1
is true if cond1 is false, and is false if cond1 is true.
Boolean Data Type
any expression that evaluates to either True or False
IF Block
allows a program to decide on a course of action based on whether a certain condition is true or false
Nested IF
a situation in which an action part of an If blocks consists of another If block
Else IF
an extension of the if block allows for more than two possible alternatives with the inclusion of this type of clause
Select Case Block
an efficient decision-making structure that simplifies choosing among several actions. it avoids complex If constructs; determined by the value of an expression called a selector
List Box (Add)
lstBox.Items.Add()
Radio Button
allows the user to make a single choice from among several options
Check Box
a small square and a caption that presents the user with a yes/no choice
Group Box
groups radio buttons together
Function
used to break complex problems into small problems to be solved one at a time; has a single output that can be of any data type; returns the output
Sub Procedure
used to break complex problems into small problems to be solved one at a time; function procedures that don’t return values; most common uses are to receive input, process input, or display output
Header
the first line of the procedure; contains the parameters
Parameters
the variables appearing in the header of a procedure
Arguments
the variable in parentheses after a function call; must match the parameters of a Sub or Function statement in number, type, and order, but need not have the same names
Call
Name of function used in event to trigger said function
Pass
gives the value found via the function to the event
Return
give the output of a function
Passing by Value (ByVal)
passing a copy of a variable to your subprocedure; you can make changes to the copy and the original will not be altered
Passing by Reference (ByRef)
you are not handing over a copy of the original variable but pointing to the original variable; used primarily to acquire input
Scope of a Variable/Constant
the portion of the program that can refer to it
Block-Level Scope
a variable or constant declared inside an If or a Select Case block
Class-Level Scope
a variable or constant declared outside a procedure and can be referred to by any procedure
Local Variable/Constant
declared in a procedure but not in a block; can be referred to anywhere inside the procedure, and nowhere else
Lifetime of a Variable/Constant
the period during which a variable or constant remains in memory
Advantages of Functions and Sub Procedures
They break down large problems into smaller subproblems that can be tested and coded more easily