Latest Update

Friday, November 2, 2018

Learning QBASIC and Storing Data in Computers Memories.

Introduction:

Basic stands for beginners all purpose symbolic instruction code.
It was invented by J.G Kemeny and  T.E Kurtz of dartmouth college in USA. It was first implemented in 1964 as a language for beginners. It is a very simple language with commands that are like words in the English Language. You can easily learn it and become its master. There are many versions of a basic language available today. Gw basic, Q Basic and Visual Basic and few of them. Q Basic is most popular version of these days will learn about quick basic in this post and how can we store data in Computer memory.
Learning QBASIC and Storing Data in Computers Memories.
Learning QBASIC and Storing Data in Computers Memories.


Printing:

The print command is used to show data on screen. Characters, sentences, text and numbers are printed using the print command.There are two basic keys to run Q Basic. the function key F5 is used to run the program and escape key is used to continue to the editor mode of the program.

Text Graphics:

The print command can also be used to print out shapes and pictures mode of a special characters from the keyboard.

Constants:

Constants are such value that do not change during the program execution. They remain fixed throughout the program. There are two types of constants.

1. Numeric Constants:

Numeric constants are numeric values. They contain digits 0 to 9. They can be additional, negative or positive number. Arithmetic operations are performed on a numeric constants. show  not include any special characters and are used only for calculations.
 Example 1667= positive values
                   -8= Negative Values
                   0.84= Decimal values

2. String Constants:

 String constant consist of a series of characters from the keyboard. they may be numbers letters for special characters and their represent many numeric quantities such as name addresses etc.
 Example "Rabi", "765", " hello123"

Variables: 

A variable is a location in computing memory that is labelled on it. It has a name and stores the data temporarily. The value of variable can change during the execution of program. Each variable is used to store only one kind of information. There are two types of variable as follows-

1. Numeric Variable:

Numeric variable contains a numeric value it is represented by digit or an alphabet or alphabet followed by alphabet.
Example: A,C,D2, 125

2. String Variable:

A string variable contains digit, letters, underscore symbol and it's a last characters is always a dollar sign. It is represented by an alphabet followed by a dollar sign.
Example: JR$ , Computer$

QBASIC Statement:

Instruction in Q Basic are called Q Basic statements. This statement perform various tasks. Q Basic has its own keywords and syntax rules. Syntax is the way in which an instruction is written properly.

Let Statement:

The LET statement is used to store information in computers memory. It is an assignment command and it is used to assign a value of a variable.

Print Statement:

We know that let statement can be used to store data into the computer memories and the print statement is used to retrieve or get back the store data and print it on the screen.
Example : PRINT " HELLO COMPUTER"

REM Statement:

REM statement adds comments in a program. Basically REM stands for Remark. in Q Basic REM only appears in the programming code it has no effect on the output of the program.
Example: REM This is Rem Statement.






No comments:

Post a Comment