Overview
BASIC is a family of high-level programming languages designed to be easy to learn and use. It was created to introduce programming to beginners and non-specialists, making computers more accessible to students, educators, and hobbyists.
History
BASIC was developed in 1964 at Dartmouth College by John G. Kemeny and Thomas E. Kurtz. Their goal was to create a simple language that could be used interactively on time-sharing computers.
During the late 1970s and 1980s, BASIC became extremely popular on personal computers such as the Apple II, Commodore 64, and IBM PC, often being built directly into the machine's ROM.
Key Features
- Simple and readable syntax
- Designed for beginners
- Interactive execution (immediate mode)
- Line-number-based program structure (classic BASIC)
- Wide range of dialects (GW-BASIC, QBasic, Visual Basic, etc.)
Example Programs
1. Printing numbers (FOR loop)
10 FOR I = 1 TO 5
20 PRINT "Number:"; I
30 NEXT I
40 END
2. Simple input and output
10 INPUT "What is your name? "; N$
20 PRINT "Hello, "; N$
30 END
3. IF...THEN decision making
10 INPUT "Enter a number: "; X
20 IF X > 0 THEN PRINT "Positive number"
30 IF X < 0 THEN PRINT "Negative number"
40 IF X = 0 THEN PRINT "Zero"
50 END
4. WHILE loop (modern BASIC dialects)
10 I = 1
20 WHILE I <= 5
30 PRINT I
40 I = I + 1
50 WEND
5. Simple calculator
10 INPUT "Enter first number: "; A
20 INPUT "Enter second number: "; B
30 PRINT "Sum:"; A + B
40 PRINT "Difference:"; A - B
50 PRINT "Product:"; A * B
60 IF B <> 0 THEN PRINT "Quotient:"; A / B
70 END
Legacy and Influence
BASIC played a major role in popularizing programming and inspiring generations of developers. Although modern languages have largely replaced classic BASIC, its influence lives on in educational tools and modern descendants like Visual Basic .NET.