Posts

Showing posts from July, 2018

Introduction P2

Introduction:- Every commands or instruction in QBASIC is called a statements. The statements or instruction should be given according to the rules of language in which programmer is written. The QBASIC statements are first stored in the memory of the computer and executed only when the command RUN is given  (i.e F5 key ) .

Some Basic Statements of QBASIC

A) REM statement B) CLS statement C) LET statement D) INPUT statement E) READ DATA statement   F) PRINT statement G) TAB statement H) LOCATE statement

A) REM statement

REM statement is a short form for masks”. The computer ignore anything following the word REM and is used to put remarks in the program. you may use a single quotation marks (‘) instead of REM. Example /syntax Rem “computer ignores this sentence “

B) CLS statements

CLS statement is used to clear the screen and level the cursor at the top left corner of the screen Syntax CLS

C) LET statement

LET is used for storing a value can be an expression of literal and must be same type as the variable Syntax Let <variable=<expression> Example LET num 1=20or a *b+c

D) Input statement

The input statement is used to receive from the keyboard during programing execution Syntax INPUT [“defines,] = next Variable same Example”INPUT”enters the first num 1

E) READ DATA statement

READ statement is used to read data from DATA statement into variables. The purpose of statement is to store the numeric and string constants that are accessed by the programs READ statement. Syntax READ variable (variable 2) DATA constants 1[constant] Example READS, C DATA 850, 800

F) PRINT statement

PRINT statement is used to display numeric or string data on the screen a question mark (?) used instead the word print Syntax PRINT [list of example [I ,! ][] Example PRINT “perimeter “perimeter”?

G) TAB function

TAB function causes program output to shift to the right specified number of species Syntax TAB (n) NOTE Where n is an integer expression in the range 0 – 32767 if n is out of range over flow error occurs.

H) LOCATE statement

  LOCATE statement is used to position the cursor on the screen and the optionally to defined cursor attributer it is commonly used with PRINT statement Syntax LOCATE: [row [cursor] [start] [shop]

Qbasic Part-II Questions

Comming Soon