BASIC Programming Language

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.

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.

  1. CHARACTER SET

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.

  1. KEYWORD

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.

  1. CONSTANTS

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

  1. Sting Constant
  2. Numeric Constant

 

  1. VARIABLE

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:

  1. String Variable
  2. Numeric Variable

 

  1. OPERATOR

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  

OBJECTIVES:

  • 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.

Symbol Meaning
* Multiplication
/ Division
+ Addition
Subtraction
^ Exponentiation
\ Integer division
MOD Modulus

Example:   (95/2=47.5)

Formula Results
8\2 4
95\2 47
95.0\2 47
95\2.0 47
95.0\2.0 47

See also:

PROGRAMMING LANGUAGE

INTRODUCTION TO DATA PROCESSING

Computer Input devices and Output devices

Data and Information

Output Devices II

Leave a Comment

Your email address will not be published. Required fields are marked *