MIS 3013 Chapter 4
Boolean Data Type
A Boolean data variable can contain a value that Visual Basic interprets as either true or false.
Decimal data type
A Decimal data type accurately represents large or very precise decimal numbers.
Double data type
A Double data type can represent huge positive numbers and very small negative numbers that can include values to the right of the decimal point.
String variable
A String variable is a named location in RAM that can store a string value.
TextBox object
A TextBox object allows users to enter data into a program.
constant
A constant contains one permanent value throughout the execution of the program. It cannot be changed by any statement within the program.
Divide By Zero Exception
It is not possible to divide by zero, so if your program contains a division operation and the divisor is zero, the Divide By Zero Exception will occur.
procedure
The code between the Sub statement and the End Sub statement is a procedure.
Integer
int
Long
lng
lifetime
local variables have a certain lifetime in the program. They are only "alive" from the time the procedure begins until it ends.
scope of a variable
The scope of a variable specifies where the variable can be referenced in a Visual Basic statement within the program. The rule is: A variable can be referenced only within the region of the program where it is defined.
numeric data type
A numeric data type must be used in arithmetic operations.
Function procedure, or a function
A procedure that returns a value is called a Function procedure, or a function.
variable
A variable is a named location in RAM where data is stored.
local variable
A variable that can only be referenced within the region of the program where it is defined is called a local variable.
Boolean
bln
Byte
byt
Date
dtm
Short
shr
Single
sng
assign data to a variable
strNumberOfSongs = txtNumberOfDowloads.Text
concatenation operator
&
arithmetic operator
+-*/^\Mod
Integer data type
An Integer data type holds a nondecimal whole number in Visual Basic.
Integer variable
An Integer variable identifies a location in RAM where an integer value is stored.
Overflow Exception
An Overflow Exception occurs when the user enters a value greater than the maximum value the statement can process.
General Format: Define a Variable-Decimal variable
Dim decFinalCosts As Decimal
General Format: Define a Variable-Integer variable
Dim intNumberOfSongs As Integer
Char data type
The Char data type represents a single keystroke such as a letter of the alphabet, a punctuation mark, or a symbol.
MaskedTextBox Object
The MaskedTextBox object allows you to specify the data format of the value typed into the text box.
String
The String data type is used for values that the user enters in a TextBox object and that are stored in the Text property of the TextBox object. A String data type can store any character available on the computer. String variables cannot be used in an arithmetic statement. Data in the Text property of a TextBox object is treated as String data.
ToString("G") ToString("C") ToString("F") ToString("N") ToString("P") ToString("E")
General Currency Fixed Number Percent Scientific
argument
An argument identifies a value required by a procedure. To pass the argument to the procedure, include its name within parentheses following the name of the procedure in the calling statement.
define a constant value
Const cdecPricePerDownload As Decimal = =0.99D
General Format: Define a Variable-String variable
Dim strNumberOfSongs As String
defines a variable
Dim strNumberOfSongs As String
Format Exception
Divide By Zero Exceptions. A Format Exception occurs when the user enters data that a statement within the program cannot process properly.
ToInt32
One procedure that converts a String data type to an Integer data type is named ToInt32.
Sub procedure
The procedure performed its task but did not return a value. A procedure of this type is called a Sub procedure.
concatenation
The process of joining two different values into a single string is called concatenation.
format specifier
To identify the format for the numeric data to be returned by the ToString function, the format specifier must be included as an argument in the parentheses following the ToString function name.
Option Strict On
To prevent automatic conversion of values, the developer must insert the Option Strict On statement in the program prior to any event handler code.
assignment statement
When a variable is defined, the variable does not contain any data. One method used to place data in the variable is an assignment statement. The value to the right of the equal sign will be copied to the variable to the left of the equal sign.
literal
When an assignment statement includes a value, the value is called a literal because it literally is the value required by the assignment statement.
class
a class is a named grouping of program code.
Decimal Data Type
cdec
Char
chr
intNumberOfSongs = Convert.ToInt32(strNumberOfSongs)
class name.procedure name.argument
Double
dbl
Decimal
dec
Dim
variable dimension
global variables
variables that can be used in multiple regions of a Visual Basic program