Repository
https://github.com/HelpToGrow/RanaTalhaTraiq/blob/master/Examples%20GW%20BASIC
What Will I Learn?
_Learn about BASIC
_History of BASIC
_What is GW BASIC
_Rules Of GW BASIC
_All basic use of GW BASIC
_All basic command of GW BASIC
_Coding in GW BASIC
Requirements
Because we are learning about programming in GW BASIC so first we have to learn its rules
Rules of GW BASIC
Characters Sets
The Microsoft GW BASIC characters set consist of Alphabetic characters .Numeric characters and Special characters.Alphabetic characters
The alphabetic characters in GW BASIC are the uppercase letter <A,B,C...................>And lower <a,b,c..................> of the English alphabet.
Numeric characters
The GW BASIC numeric characters are the 10 digits from 0 to 9.
Special characters
The GW BASIC special characters are below in the image
Elements of BASIC
Elements of BASIC are as follow
Constant
Numerical quantities in BASIC are referred to as numbers or constant .Constant cannot change during program execution.There are two types of constant
Variable
There are two type so of variableOperators
Operations are lexical entity that indicates the action to be performed on operands(constant and variable). Operators perform mathematical or logical operations on value There are three type of operators.Arithmetic operations
Arithmetic operations perform simple mathematical calculation such as addition and subtraction .All arithmetic operations are listed below in the following table with their implicit order of priority.
Order of Priority
Computer assigns an order of priority to operators by which high priority operators are evaluated before those low priority .Operators of equal priority are performed from left to right
Example 1:
8/2^2/2+4^12
Example 2:
4+9/3-1
Relational Operators
Relational Operators are used to make a decision in theexecution of program . They compare two values and result will be either True or False The relational operators are given in the following table.
Logical Operators
In GW BASIC, there are three logical operators:
Expression
GW BASIC Functional Words
Functional Words are used in expressions to perform predefined routine on an operands .For example LEN , MID$ ,SQR etc there are two kinds of functional wordsSyntax,/h3>
Syntax is the rule of language just like grammatical rule for English language .If we do not follow the rules of English Language we cannot write good English .Similar is in GW BASIC language .If we do not now about the rules of BASIC language we cannot write program.
Download any GW BASIC version according to your need and device for coding in GW BASIC
Statement
In GW BASIC language , programs are written in a sequence , which consist of a series of statement .Each statement consists of one or more lines in length and each statement in a program must store with a statement number.
REM Statement
If we want to give any heading or want to type miscellaneous remarks , The REM statement is used . REM is an abbreviated for remarks .This statement facilitates us to type any remarks such as the following.
LET Statement
If we want to give any data to the computer, which is to be used many times in the program, we may assign it in a variable . To assign any single data , we may use LET statement
Syntax INPUT Statement
Using INPUT statement , we can input data into the computer .This statement provides the facility to input data
Syntax
The INPUT statement has the following syntax
(line num) INPUT (List of the variable separated by commas)
22 INPUT A, B,
Example is in the github with heading ### Example # 4
PRINT Statement
If we want to display the result on our monitors's screen using the BASIC statement use print statement
Print statement is used as given in the following syntax :
Example
100 PRINT T
110 PRINT AV
120 PRINT , AV
If we want to print on the screen
Any text ,which we want to print on the screen , is written just like the variable but this is enclosed with quotes
Example
130 PRINT "Lahore"
We will write the variable separated by the commas .Thus the values will be printed in the same line on the screen
Read - Data statement
Read - Data statement are two statements connected with each other which are used to put data in a line of a program and to read the date when it needed
Read statement is used as given in the following
Syntax
(Line Number) READ <variable, variable................>
Example is in the github with heading ### Example # 5
Data Statement
Data Statement has the following syntax
Syntax
(line number) DATA<Data ,data>
Example is on github with heading ### Example # 6
Question
Write a program to find the average of the number 27,93,84,60,45 ?
Unconditional Jump in the program
Sometime it is required to jump at a certain step of program unconditionally .Thus certain steps could be repeated or skipped .For this purpose GOTO Statement is used.
GOTO Statement
With the GOTO statement ,that the line number is given on which we want to jump General syntax is as below
SyntaxSave the Program
To save means to get a program recorded on drive ,If we want to store our program on the hard disk or any recording media we may use Save command.
How To Save Command ?
Simply typing Save or press F3 ,give the name of the program , which is to be stored and then press Enter Key.
Example is on GitHub with heading ### Example # 8
https://github.com/HelpToGrow/RanaTalhaTraiq/blob/master/Examples%20GW%20BASIC
Difficulty
- Basic
Tutorial Contents
Introduction to BASIC
Introduction to BASIC is an abbreviation of " Beginners All Purpose Symbolic Instruction Code" BASIC is easy to learn high-level interactive programming language . It is a very simple and similar to English for example : LET, PRINT,GOTO,INPUT,READ,WRITE,IF..THEN etc. Are the some statement Of Basic has become more popular and famous.
BASIC is helpful in all fields of life.We may make programs for different purpose for example Accounting ,Spread sheet ,Business,Science ,Engineering and Education etc . BASIC has also graphic facilities and sound generation system so that we may enjoy BASIC as playing games.
History of basic
The early computer languages are little difficult to learn and apply .As the use of computer became more wide spread it was decided that a new simple language was needed , this formed the basis of BASIC.
Dr John G. Kemeny and Dr .Thomas E.Kurtz professor of Dartmount College USA developed a simple language for beginners in mid 1960's The language has some grammatical rules just like as English grammar rules called syntax. Within very short period BASIC was widely used in schools,colleges and many other fields. After development of microcomputer 1970's BASIC became standard language for microcomputer.Now BASIC is not very popular but still it used in schools to teach programming to beginners .
Now we are talking about GW BASIC SoWhat is GW Basic
BASIC got the ANSI (American National Standard Institute) standard in 1978 Different versions of BASIC language introduced but now common version is GW BASIC We had syntax GW BASIC
Nearly all BASIC language have same syntax
Proof of Work Done
Thanks,
https://github.com/HelpToGrow/RanaTalhaTraiq/blob/master/Examples%20GW%20BASIC (line number) LET (Variable = data) Example are in github with Heading ### Example # 3 https://github.com/HelpToGrow/RanaTalhaTraiq/edit/master/Examples%20GW%20BASIC (line number)GOTO(line number on which we want to go) 50 GOTO 10 Example Is on GitHub with heading ### Example # 7 https://github.com/HelpToGrow/RanaTalhaTraiq/blob/master/Examples%20GW%20BASIC Question Write a program to generate the number from one to indifinate An expression is collection of operands (constant and variable) to join together certain operations to perform the algebraic like term. Conversion of arithmetic expression into BASIC expressions is in this picture

Thank you for your contribution.
Your contribution will not be rewarded for the following reasons:
See in this link an example of a good tutorial.
Chat with us on Discord.
[utopian-moderator]Need help? Write a ticket on https://support.utopian.io/.
You have been banned from receiving Utopian reviews for duplicate account activity @ranatalha. You used her same github user and repository which is basically a pointless repo with just code results.
Chat with us on Discord.
[utopian-moderator]Need help? Write a ticket on https://support.utopian.io/.
Congratulations @allright! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP