What is BASIC Programming Language?
BASIC (Beginner’s All-purpose Symbolic Instruction Code) is a high-level programming language that was designed in the mid-1960s by John G. Kemeny and Thomas E. Kurtz at Dartmouth College. It was created to provide a simple and accessible language for beginners to learn programming.
Table of Contents
BASIC was one of the earliest programming languages to be widely adopted and played a significant role in the popularization of computer programming. It was primarily used on early microcomputers, including systems like the Commodore 64, Apple II, and MS-DOS.
BASIC is known for its simplicity and ease of use, featuring English-like keywords and straightforward syntax. It was designed to be interactive, allowing users to write and execute programs directly without the need for a separate compiler or complex setup.
The language provides a set of basic commands and statements for performing various operations, such as arithmetic calculations, input and output operations, control structures (e.g., loops and conditionals), and handling simple data types like numbers and strings.
Over the years, several dialects of BASIC emerged, each with its own variations and enhancements. Some popular variants include Microsoft BASIC, GW-BASIC, QBASIC, and Visual Basic.
While BASIC is not as commonly used today in professional software development, its legacy remains significant, as many programmers got their start with BASIC and later transitioned to other languages. Its simplicity and beginner-friendly nature have made it an important language in the history of computer programming.
ELEMENTS OF QBASIC
Every programming language consists of some basic elements which are required to make a program. The element required to construct a BASIC program consists of a set of characters, keywords, constants, variables, operators, and expressions.
The BASIC Character Set consists of alphabets (both small and capital), numbers (0 to 9), and special characters. These special characters have their meaning and function.
Keywords are those words that have special meanings in BASIC. Keywords are statements or Reserved Words, commands, and names of operators. Some reserved words are CLS, REM, INPUT, LET, PRINT, FOR, DO, SELECT, MID$, ASC, SQR, LEN, LEFT$, TIME$, and INT.
Constants are the data or the values in a program that cannot be changed during the program execution. The data may be a letter, words, numbers, or special characters. Types of constants are
- Sting Constant
- Numeric Constant
A variable is an entity that stores data needed to be used in a program. Each program defines a different number of variables.
There are mainly two types of variables. They are:
- String Variable
- Numeric Variable
Operators are symbols that indicate the type of operation BASIC has to perform on the data
There are four types of operators in BASIC. They are Arithmetic Operators, Relational Operators, Logical Operators, and Sting Operator.
QBasic’s Math Operators
- Using QBasic Math Operators
- Use Order of Operation
- Store the results of calculations in variables
- Print the result of the calculations
A Math Operator is a symbol used for addition, subtraction, multiplication, division, or other calculations
The QBasic math operators and their meanings.