Monday 19 September 2016

QBASIC DATA


Data is a collection of facts and figures that is entered into the computer through the keyboard. Data is of two types:

1. CONSTANT: Data whose value does not change or remains fixed. There are two types of constants:

(a) NUMERIC CONSTANT: Numbers - negative or positive used for mathematical calculations
e.g. –11, 22, 0

(b) ALPHANUMERIC CONSTANT / STRING: Numbers or alphabets written within double quotes(inverted commas “ “).
e.g. “Computer”, “Operating System”


2. VARIABLE: Data whose value is not constant and may change due to some calculation during the program execution. It is a location in the computer’s memory, which stores the values. Depending on what value is held, Variables are of two types:

(a) NUMERIC VARIABLE: The variable that holds a Numeric Constant for arithmetic calculations (+, - ,*, / ) is called a Numeric Variable.
e.g. A = 22, here A is the Numeric Variable

(b) ALPHANUMERIC VARIABLE: The variable that holds an Alphanumeric Constant, which cannot be used for arithmetic calculations, is called Alphanumeric Variable or String Variable. An Alphanumeric variable must end with a $ sign and the Alphanumeric constant must be enclosed in inverted commas.
e.g. Name$ = “Abhijeet”, here Name$ is an Alphanumeric Variable


RULES OF QBASIC




Every programming language has a set of rules that have to be followed while writing a program, following are some rules of QBASIC language:

1. All QBasic programs are made up of series of statements, which are executed in the order in which they are written.
2. Every statement should have at least one QBasic command word. The words that BASIC recognizes are called keywords.
3. All the command words have to be written using some standard rules, which are called “Syntax Rules”. 
  Syntax is the grammar of writing the statement in a language. Syntax Errors are generated when improper syntax is detected.

Sunday 18 September 2016

FEATURES OF QBASIC


1. It is a user friendly language.
2. It is widely known and accepted programming language.
3. It is one of the most flexible languages, as modification can easily be done           in already existing program.
4. Language is easy since the variables can be named easily and uses simple English phrases with mathematical expressions.

INTRODUCTION TO QBASIC



BASIC stands for Beginner’s All Purpose Symbolic Instruction Code. It was invented in 1963, at
Dartmouth College, by the mathematicians John George Kemeny and Tom Kurtzas.

BASIC is an interpreter which means it reads every line , translates it and lets the computer execute it before reading another. Each instruction starts with a line number.