VB Flashcards
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)