Chapter 2- Basic Programs Flashcards
(19 cards)
Boolean
A value that is True (0) or False (1)
Char
A value that consists of one character
Class scope
Refers to a variable that is declared in the private or public section of a class definition. Can be accessed by all methods in the class
Constant
A fixed value allocated to a variable in a program
Data type
Indicates the type of data to be stored in a variable
DIV
An operator that gives the quotient of two values as a whole number
Duration of a variable
The lifetime- how long or when a variable exists in a program.
Local Duration
When variable declared in event handler: will be created when event handler executes, will be destroyed when event handler is done being executed.
Static duration
When a variable is declared as public or private variable of the class of a Form: will exist all the time while program is running
FloatToStrF
Function used to format output
Eg: pnlOut.Caption:=FloatToStrF(rVal, ffFixed,6,2);
InputBox
Function that generates a dialog box to obtain input
Eg: sName:= InputBox(‘Type the name:’,’Name:’,’’);
Integer
Value of this type can only be a whole number
Method scope
Refers to a variable that can only be used in a method because it is declared in the VAR section of that method
MOD
Operator that gives the remainder after the division of 2 values
Real
Value of this type can be any number
Scope of a variable
The part of a program where a variable can be accessed (Method, Class, Unit)
String
Data item that consists of combination of characters
Unit scope
Refers to variables declared in the implementation section of the unit file.
Variable
A space in RAM where a data item can be kept temporarily