QBASIC LECTURE 01 (Introduction To Qbasic)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

INTRODUCTION TO QBASIC

Programming Language
Anonymous!

1.1 Introduction
QBASIC is a variant of BASIC programming language. BASIC was developed by Professor J.G.
Kemeny and Professor T. E. Kurtz of Dartmouth college, New Hampshire, USA. It was developed
as a language for beginners and was implemented in 1965. As it was a simple and easy to
understand programming language, it become instantly popular with the beginners who wanted to
learn how to program the computer.
QBasic is a simple and easy-to-learn programming language that was developed by Microsoft for
beginners and hobbyists. It is a variant of the BASIC (Beginner's All-purpose Symbolic Instruction
Code) language and was first introduced with MS-DOS 5.0 in 1991. QBasic provides a
straightforward way to write and run programs, making it an excellent choice for individuals who
are new to programming.
Since its development, BASIC has undergone many modifications and improvements, and now
many versions of it are available. One of the most significant version of BASIC is GW BASIC
which was developed by Bill Gates and Paul Allen, of the Microsoft Inc. Later GW BASIC was
improved and modified to enable it to work on the Windows Operating system and was introduced
as the QBASIC programming language.
QBASIC language can be used to write programs to instruct the computer to do various tasks such
as performing calculations, drawing simple and complex graphics, creating computer games and
animations, etc.

1.2 Key Feature of QBASIC

QBasic has also some key features and They are:


 Structured Programming: QBasic supports structured programming concepts like loops
(e.g., FOR...NEXT, WHILE...WEND) and conditional statements (e.g.,
IF...THEN...ELSE).
 Ease of Use: The language's syntax is relatively straightforward, making it accessible to
beginners. Its simplicity allows users to focus on learning programming concepts without
being overwhelmed by complex syntax.
 Interactive Mode: QBasic has an interactive mode where you can write and execute
code line-by-line, allowing for quick experimentation and learning.
 Graphics and Sound: QBasic has built-in support for simple graphics and sound,
enabling users to create basic games and visual applications easily.

1|Page
 Integrated Development Environment (IDE): QBasic comes with an integrated
development environment that includes an editor, compiler, and debugger, all within the
same application. This makes it convenient to write, test, and debug code in a single
environment.

Beside these key features, it has some more feature like:


i. Available in every computer from micro to mainframe.
ii. QBASIC has a lot fewer requirements.
iii. Free to use.
iv. Applicable for use in Business purposes and Mathematical learnings.

1.3 Application of QBASIC

 QBasic is the most suitable language for the beginners to start with. It introduces people to
programming without any need to worry about the internal working of the computer.
 QBasic is very easy and simple to apply and create business applications, for creating
games and even simple databases. It offers commands like SET, CIRCLE, LINE, etc. which
allow the programmer to draw using Qbasic. Hence, graphics can also be created using
QBasic.
 QBasic also supports creating sounds of some desired frequency through the speakers of
your PC. Though only one sound can be played at once.

1.4 Advantage of QBASIC

 The key feature of the language is its close resemblance to English.


 Syntax of your code is checked automatically.
 Qbasic has a dynamic program debugging feature.
 Lengthy programs can be broken into smaller modules

1.5 Disadvantage of QBASIC

 The language is not structured.


 Qbasic is DOS based and has now become obsolete and is limited only in the field of
education and programming.

2|Page
1.6 Types of Mode in QBASIC

QBASIC can be made to translate your instructions in two modes:


 Direct Mode
 Program Mode

Direct Mode: The accepts single line instructions from the user and the output is viewed as soon
as enter key is pressed. The instructions are not stored in the memory. This mode can be used to
do quick calculation. They do not have line numbers.
E.g.
Print 3+4
Print “This is the Direct mode in QBasic”

Program Mode: The mode is used to type a program which is stored in the memory. They have
line numbers. We have to give the command to get the output.
E.g.
10 Print 3+4
20 End
RUN

Programs are built up with set of instructions or commands. Every programming language has its
own SYNTAX (rules) and COMMANDS.

3|Page

You might also like