BASIC (Beginner’s All-purpose Symbolic Instruction Code) is a computer programming language created by John G Kemeny and Thomas E Kurtz at Dartmouth University in 1964. The benefit of BASIC is that it features English-like instructions that are easier to learn and remember than those of most other languages. Despite this, the most recent versions of BASIC can accomplish almost anything that programming languages like C or Pascal can.
BASIC was the first programming language available for personal computers (Microsoft began by selling a version), and it has resurfaced in recent years as VISUAL BASIC, but the latter has little relation to older versions.
Versions of BASIC:
1.BASICA
2.GWBASIC
3.Turbo BASIC
4.Quick BASIC
5.VB.NET
Features of BASIC:
- A programme loop is created when a sequence of commands is performed repeatedly. The number of times it will be performed, or how long the programme will remain in a loop, is determined by the requirements for exiting the loop.
- Contains system commands — These commands are typed onto the keyboard by the user and have a specific purpose.
- There are user-defined functions, which perform a task based on a set of input parameters. After being executed, functions return a value.
- It can be utilised for a wide range of commercial applications, and its enhanced graphical user interface and object-oriented capabilities make it an obvious option for techies.
- The Basic programming language is straightforward and easy to comprehend, and it works on all operating systems. It comes with pre-programmed functionalities and organised programming.
- Rather than focused on batch processing, BASIC is meant to engage with the user more.
- Add sophisticated features for advanced users — BASIC programming was created as a high-level programming language for teaching people how to programme, so it’s the ideal place to begin your computer science and application education.
List of BASIC Commands:
HELLO — sign in
BYE — exit
BASIC — begin BASIC mode
NEW – choose a name for your programme and get started writing it.
OLD — this command retrieves a previously named programme from long-term storage.
LIST — shows the current programme in a list format.
SAVE — saves the current programme indefinitely.
UNSAVE — removes the present programme from its long-term storage location.
CATALOG — shows the names of programmes that are saved in a permanent location.
SCRATCH — deletes the current application without removing its name from the list.
RENAME — changes the current program’s name without deleting it.
RUN — this command executes the existing applications.
STOP — interrupts a programme that is presently running.
Syntax (Print statement):
- The print statement is used to display text and numbers on the text output area.
- Print followed by Text, numbers and other symbols (ex: *, &, ^, % etc.) enclosed “ ” (in quotes) are displayed as they are entered.
- Print followed by arithmetic expressions (ex: addition, multiplication, division etc.) are evaluated and the result is displayed.
- For getting output of several print statements on the same line, use a ‘;’ (semicolon) at the end of each Print statement.
Variables:
BASIC allows you to name and save information in the memory locations of a computer. This is referred to as a variable. You can save data in a variable after it has been named. You may also use its name to find it and utilise it in your programme.
- Only numbers can be stored in a numeric variable (integers and decimals).
Syntax:
- The name of a numeric variable starts with a letter and can include both letters and numbers.
- Numeric variables are used to store and retrieve numeric values (integers and decimals).
- The variable name is case sensitive, which means that if you store a variable named ‘A’, you must get the value using ‘A,’ not ‘a’.
- String variable refers to the variable in which you store text. To tell a variable that the value it will store is a string, add a ‘
Conclusion:
BASIC (Beginner’s All-Purpose Symbolic Instruction Code) programming has a long history in the field of computer science, and it has been used to facilitate communication between the programmer and the machine. John G. Kemeny and Thomas E. Kurtz created it as a teaching language at Dartmouth in 1963, and it has since been extensively replicated and adapted.