Tuesday, 24 November 2015
Class 8 - Inputbox
There are 4 steps in a program.
1. Declaration (dim)
2. Input the value
3. Calculation(if any)
4.Output(msgbox)
Sunday, 15 November 2015
Thursday, 5 November 2015
Classs 6 - QBASIC
Ch 9 QBASIC statements
QBASIC is programming language, which is suitable for a beginner who wants to learn a programming language. It is simple and super easy.
Character Set :
It is the set of characters allowed to use in QBASIC.
It consists of
I. alphabets(a- z and A - Z)
II. numbers (0 to 9)
III. special characters (@,!,#,?,;,. etc
Constants :
The values which do not change are called constants. There are two types Numeric constant and String constant.
Numeric Constant :
- It includes whole numbers ,decimal numbers.
- It can be a positive number or a negative number.
- Should not have special characters.
Valid numeric constants :
124
45.78
- 7
Invalid numeric constants :
Rs.500
#1
String Constants :
- It includes alphabets ,numbers and special characters.
- Should be within double quotes.
Valid string constants :
"Cotton Boys"
"Computers"
"150 years"
Invalid string constants
Bangalore (because no quotes)
Variables
The values that may or may not change are called variables. There are two types
- Numeric Variable
- String Variable
It stores numeric constants. There are some rules in naming a variable.
- It should start with an alphabet.
- Remaining letters if any, can be an alphabet or a number.
- No reserved words(like let, input, print, rem, cls .. etc)
- No special characters.
- A
- sum
- X5
- sum of - (space)
- 8line - (First letter is number)
It stores string constants.
- It should start with an alphabet.
- Remaining letters if any, can be an alphabet or a number.
- No reserved words(like let, input, print, rem, cls .. etc)
- No special characters except $.
- It should end with a $ symbol.
- boy$
- d3$
- comp$
Subscribe to:
Posts (Atom)