Posts

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