Fundamental Concept of QBasic : QBasic Tutorial

Fundamental Concept Of QBasic : QBasic Tutorial. introduction to qbasic, what is qbasic programming language, write a program in qbasic

Introduction to QBasic

Quick Beginners All Purpose Symbolic Instruction Code is a high level programming language developed by Microsoft Corporation, USA in 1985. It is a modular programming, where programming is divided in different modules or procedures. Q BASIC uses English like words and Mathematical symbols to write programs. Once you learn Q BASIC programming it will be helpful to learn other high -level programming languages such as c, c++, java, php, Dot-Net,etc.

Fundamental Concept Of QBasic : QBasic Tutorial

Modes of Operation

The various ways in Q BASIC can be operated for obtaining result:

a. View Window Mode: - The (upper) layer part of the full screen.

b. Immediate Window Mode: - The small window of the bottom of the  editing window .

Q BASIC Statements and Its Purpose

a. CLS is used to Clear the display screen.

b. Rem is used to write remarks or explanation of program.
Syntax: Rem Remark

c. Input is used to supply or input data from the keyboard.
Syntax: Input"prompt message";variable list

where prompt message tell user what type of data is to be entered.

d. Let is used to assign value of an expression to a variable. It is an optional statement.
Syntax: Let Variable=Expression

Let A = S
Let Name$ = 'Binod'

e. Print is used to display output on the screen in the desired alignment with some spacing in limited ways. It displays data, value of variable or expression on the screen.
Syntax: Print (Expression) Separator (Expression)

Print"My Name"; Tribhuwan
Print"My Phone No"; 98*******0
Print (3^2+5)/2

f. Const is a non-executable statement that declares one or more symbolic constants.
Syntax: Const Symbolic Constant = Expression

CONST PIE = 22/7
A= PIE* R^2

g. End is used to terminate the Q Basic Program.

h. Statement is the instruction within a program. The four types of statements are;

  • Declaration Statement
  • Assignment Statement
  • Control Statement
  • Input/Output Statement

i. Command are the instructions to the computer to do something to a program as printing, saving etc.

j. Character Set is a set of characters which are valid in Q Basic. It consists of alphabet (A-Z, a-z) number ( 0-9) and special characters like: !,@,#,$,%,%,^,&,*,(,),?,>,<,+,=,',",.

k. Keywords are special words which have special purpose and meaning in Q Basic. Some of the keywords are CLS, REM, PRINT. AND, OR,LEN, WHILE etc.

You May Also Like...

Socialize with Us