You are on page 1of 13

Code in Visual Basic is stored in the form of modules.

The of modulthree kind es are Form Modules, Standard Modules and Class Modules. A simple application may contain a single Form, and the code resides in that Form module itself. As the application grows, additional Forms are added and there may be a common code to be executed in several Forms. To avoid the duplication of code, a separate module containing a procedure is created that implements the common code. This is a standard Module.

1. Numeric
 Byte     

Store integer values in the range of 0 to 255 ( 6 254 100 +20 -9) Integer Store integer values in the range of (-32,768) - (+ 32,767) Long Store integer values in the range of (- 2,147,483,468) - (+ 2,147,483,468) Single Store floating point value in the range of (-3.4x10-38) - (+ 3.4x1038) Double Store large floating value which exceeding the single data type value Currency store monetary values. It supports 4 digits to the right of decimal point and 15 digits to the left

2. String A sequence of one or more characters that are enclosed within double quotation marks ( a Z Anne * ) 3. Date For date values data type ( Birthdate = #Sept-12-87# ) 4. Boolean Boolean data types hold either a true or false value. Values are internally stored as -1 (True) and 0 (False) and any non-zero value is considered as true. 5. Decimal Refers to any large numerical value whether it is an integer or floating point. 6. Object Refers to objects within Visual Basic application or other application ( Dim objDb as Object)

Arithmetic
Operators Description
Add Substract Divide Integer Division Multiply Exponent (power of)

Example
5+5 10-5 25/5 20\3 5*4 3^3

Result 10 5 5 6 20 27 2

+ / \ * ^ Mod &

Remainder of division 20 Mod 6 String concatenation

"George"&" "&"Bush""George Bush"

Relational
Operators > < >= <= <> = Description Greater than Less than Greater than or equal to Less than or equal to Not Equal to Equal to Example 10>8 10<8 20>=10 10<=20 5<>4 5=7 Result True False True True True False

Logical
Operators Description Operation will be true if either of the operands is true Operation will be true only if both the operands are true

OR

AND

What are the programming fundamentals of visual basic? How important are those in designing and developing an application program? Using the Addition Calculator Application, explain how the programming fundamentals are applied in the design of the application.

A.

Identify which does not belong to the group. b. b. b. b. b. b. b. b. b. long double date OR declaration AND % form 5*3 c. c. c. c. c. c. c. c. c. variant single arithmetic ampersand logical $ # class 7 mod 2 d. d. d. d. d. d. d. d. d. Date Currency String Integer Relational * 6 Standard 10 %

___1. a. string ___2. a. quadruple ___3. a. boolean ___4. a. greater than ___5. a. arithmetic ___6. a. True ___7. a. @ ___8. a. procedure ___9. a. 2^2 ___10. a. and

b. *

c. &

d. mod

Value
1. 2. 3. 4. 5. 6. True 200 +143 33,000 3.1416 -15

Data Type

Thank You

You might also like