VB Flashcards
(31 cards)
Variable is a
Memory location that holds data and can be changed during the execution of a program.
What is a Constant?
Quantities that do not change during the execution of a program are called constants. If an attempt is made to change the value of a constant during execution, an error will be generated.
How to declare a variable?
Declaration of a variable means specifying its data type. A variable can be declared as:
Dim <varname> As <data></data></varname>
Variable name is also called as
An identifier as it identifies a memory location
The amount of memory space required depends on its
Data type
What is a declaration statement?
Statement that declares a variable is a declaration statement and it’s a non - executable statement.
Syntax of declaring a constant
Const constname As <data></data>
What are intrinsic constants
Intrinsic constants are system defined constants or predefined constants these constants need not be declared and can be used directly
Constants starts with the prefix
Vb
What is a default data type?
Default data type is called as the variant
Variant
Requires more space in the memory and operates less slowly then other data types
Data types used in VB are
Boolean byte currency data double integer long single string and variant
Integers in the range
-32768 to 32767
What is a function
Function is a code that performs certain actions and returns or gives a value.
To do it’s calculations, a function needs an input, this input is called as the function argument.
The purpose of the val statement of val function
The purpose of the valve function is to convert text data into numeric data
Syntax: val(texttoconvert)
Arithmetic operations in which vb
Exponential division multiplication addition on and subtraction are the arithmetic operations in vb
What do you mean by formatting data
Formatting Data means to control the way it will look on the screen or paper
The format functions in vb
Format currency format number function format percent function format date time function
Control structures
Control statements are used to control the flow of execution in a program
Examples of decision statements
If then statement if then else statement if then elseif statement select case statement
Example of loop structures
Do while loop while wend loop for next loop
What is a relational operator
A relational operator gives a relation between its operands. Whenever a relational operator is used the result of the operation or expression is either true or false.
How many relational operators are there name them
6 relational operators
>,<,=,<>,>=,<=
The if then statement
Execute a set of statements if a given condition is true