Now we will discuss about some of operators of GW basic ,which is one of the most famous programming language
Data type’s assignment input/output statement In GWBASIC
In the begging the program are written in binary language which were in binary form I mean in the o and 1 form. It was very difficult to understand that’s people began to start write program assembly language instead of machine language and other programming language like Cobol C C++.
GwBasic in Urdu Part 2: 10 Class
Here are the three types of languages
- Machine language
- Assembly language
- High level language
GWBASIC is one of the easiest high level language .It is easy to use because it contains many English words like GOTO,THEN,IF,INPUT,READ,POINT.
What Direct and Indirect Mode in GWBASIC
Some words are used to give command to the computer.When we use these commands then these command gives directly resuly for example
If we write like print 17-9
It will direclty give the result 8
Wherer direct mode is used to enter the programs and after that we run the program .In Indirect mode we use line number before any statement.
10 print “X”
20 print “z”
Character are used in GWBASIC
These are the Alphabetic which are used
(A B C D E……….Z) and (a b c d…..z)
Numeric character for GWBASIC
(0.1 2 3 4 ….9)
List of special character which are used in
What are reserve word in GWBASIC?
There are some words in GWBASIC which have their own meaning like different statement function and commands are the reserve words. We cannot use reserve words as a variable if we use it as variable the compiler will show the error. These are the reserve words and their short keys are following.
Here is the list of some commands which are used in
Auto Command in GWBASIC
If we use auto command in GWBASIC it will generate the line number automatically for example if you write auto in GWBASIC the result will be like this
If we give manually increment to auto command like Aut0 100, 20 then the result will be like that
Here are some of command which are used to break auto command
Control+ C, Control+break, Control+Stop
List Command in GWBASIC
List command is used to list all the lines
LIST 20-40 it will show the list of all program from line number 20 to 40
LIST -20 it will list all the program before line number 20
List 20 – It will list all the program after line number 20
Ctrl+Break is used to stop list menu
It is used to different print range of line.
Run command is used to execute a program .
Run (File Name), Run (Line 20, Run)
Load command is used to load program form secondary storage device
Loads “file name, r
Here the purpose of r is that the program will automatically executed when it is loaded
Save command is used to save any program in GWBASIC
Save file name [A] [p]
Here a means we want to save file in ASCII format
P means we want to make the file protected that nobody can make change in it
Delete command in GWBASIC
It is used to delete one or more than one line
Delete 20 it will delete on line . Delete 30 -50 it will delete the line 30 to 50
It is used to give new number to a line
Example Renum 100, 10 Renum 100, 35, 10
Here first is new and second is old number and third in increment number.
Kill command is used to delete any program form secondary memory
It is used to changed the name of stored file
Name “anam as fida
Here the first is old and second is new name
Cleara command is used to make the screen clear
It is used to remove file from computer memory.
This command is used to move from basic editor to DOS
Variable in GWBASIC
Such quantities which can change during the execution of a program is called variable.
10 let a=10
20 let a=a+20
30 print a
The answer will be 30
In the begging the value of a was 10 but during the execution it will changed to 30
These variable is used to store string value into a variable
10 let B$=”g”
20 print B$
What is input and let statement
Let statement is used to assign a value to a variable
Input statement is used input data from user
10 input n
20 print n
Here when you run this program and it will ask you for input and then it will print your given input .
Read and data statement in GWBASIC
If we want to assign value more than one variable then we will use read and data statement
10 Read a, b
20 let c=a+b
30 print c
40 data 4,6
Print statement in GWBASIC
It is used to print data on the screen
This statement is used to take print on paper instead of screen .
Print using is used to print some specific type of statement .