BASIC is an imperative programming language. It was developed in 1964 by John G. Kemeny and Thomas E. Kurtz at Dartmouth College and disposal is not in its then form on the characteristics of structured programming, but worked with line numbers and jump instructions (GOTO ). Meanwhile, there are a variety of different BASIC dialects, some of which the younger all the elements of high level languages ​​, such as object orientation.

The acronym "BASIC" stands for " Beginner's All-purpose Symbolic Instruction Code", which means as much as " symbolic general-purpose programming for beginners ". The abbreviation seen as the word also means "basic". This shows the design goal clear: to create a simple, suitable for beginners programming language. Except in some product name contains the word " BASIC" is always written in capital letters.


The language was designed on the basis of eight principles:

  • For beginners easy to learn.
  • Universally applicable.
  • Expandability of the language for experts.
  • Interactivity.
  • Clear error messages.
  • Short response times.
  • Hardware independence.
  • Operating system independence.


BASIC was developed in 1964 by John G. Kemeny and Thomas E. Kurtz at Dartmouth College in order to facilitate the electrical engineering students to enter the programming compared Algol and Fortran. On May 1, 1964 by four clock local time, New Hampshire, the first two BASIC programs running simultaneously on a GE -225 computer by General Electric in the basement of Dartmouth College. BASIC was developed many years of ever-new computer science students at the college, also it propagated Kemeny and Kurtz from the late 1960s at several schools in the area who wanted to take computer courses for the first time in their teaching program. BASIC was free according to the desire of his " fathers " for the schools, in contrast to almost all other then usual programming languages, which usually cost several thousand dollars. Many of the former major computer manufacturers ( such as DEC) offered due to the ease of learning the language and its royalty- free usability soon BASIC interpreter for their new mini computer; many medium-sized companies which then bought because computer for the first time in large numbers came, so with BASIC in touch.

Some of the familiar with BASIC as pupils, students, working in the SME programmers were later active in the short-lived hobby computer scene in the mid -1970s, which preceded the commercial microcomputers, BASIC and made known there; no other then used high language was suitable as good as ( a lightweight ) BASIC for the extremely limited space of this first microcomputer. The climax experienced BASIC in the late 1970s and early 1980s with the emerged from the craft first home computers computers that almost all had as a user interface and programming environment a BASIC interpreter. Prominent examples include Sinclair ZX80 and ZX81, the the the Tandy TRS 80, Schneider / Amstrad CPC, Apple II, Atari 8 -bit home computer or the best-selling home computer of all time, the Commodore 64, but also the forerunner of the personal computer, such as example of Philips, could M -BASIC interpretive work or compiled with CP /. The vast majority of these BASICs were from Microsoft. BASIC was Microsoft's first and most important in the early years of product, several years before was the first operating system of this company with MS- DOS on the market.

Virtually all owners of home computers at that time had at least basic knowledge in BASIC, since most computers when you turn the BASIC interpreter started, which allowed the loading of other programs using BASIC commands. Graphical user interfaces with the Macintosh, Amiga and the Atari ST also held as the mid-1980s collection, BASIC interpreter were included in these further. There were also additional purchasable versions of BASIC dialects. Using compilers could be some BASIC dialects directly translated into significantly faster machine programs or translated by bypassing the interpreter directly in call stacks of the underlying interpreter functions. The widespread since 1981 MS- DOS also contained a BASIC interpreter - first BASICA and GW- BASIC, QBasic later - of a role played in Germany at many schools in the teaching of computer science. At this time, however, began a change, because other high-level languages ​​such as C were available for the home computer or the resources of the system were not adequately supported by the supplied BASIC interpreter, which compelled the programmer to familiarize yourself with assembler.

By implementing as interpreter language the early BASIC dialects were also significantly slower than most other, usually compiler based high-level languages ​​. This made it unattractive especially for time-critical applications and led to the use of subroutines in machine language, which were often written using POKE statements of BASIC from the main memory. Such programs were of course not portable. Therefore, and because of the fragmentation into numerous dialects BASIC is not nearly as portable.

Where the subroutine technique of BASIC has been extended to functions or procedures that could be frequently omitted the mandatory line numbers and the jump instruction "GOTO ". The much-criticized so-called spaghetti code ( confusing, especially because surprisingly difficult jumps comprehensible source code) could be avoided in favor of a structured and function-oriented programming. For some areas, however, continued temporarily Pascal as a teaching language through.

Over time, the proportion of people increased, the only use a computer, but had to program non-self. A lot of the users make word processing, spreadsheets and databases use the computer now predominantly rather than themselves to develop the required software using a programming language such as BASIC or Visual Basic for Applications.

Another reason that BASIC was meanwhile almost forgotten, was that after the collapse of the great home and office computer maker Atari and Commodore, the market was dominated by Windows PCs. With the exception of the IBM PC BASIC interpreter was not included in the IBM compatible PCs with the Windows programs you have written yourself.

With the introduction of Visual Basic version 5 Microsoft has made significant achievements in terms of processing speed, but were able to recover the lost ground not previously again.

However, Microsoft started to think one's own tradition and led the commercial Visual Basic for a rapid development of Windows -based applications. The code was not interpreted at runtime, but by a compiler during program development in low-level bytecode or in later versions even translated into native machine code. By this measure the speed and stability of the program execution could be increased significantly. As the speed of computers increased more and more, Visual Basic also became more interesting for professional development.

With the introduction of object-oriented language elements, a further attempt was made to have the same pull Visual Basic with other object-oriented programming languages ​​such as C .

BASIC is used successfully in the Office products from Microsoft and also in some other applications as VBA for internal macro programming. Many software manufacturers offer also based on BASIC programming software for the internal macro - programming of their products.

Especially in Europe, Visual Basic has been able to maintain only a limited extent in the developer community. While it offered a better and much easier access to Windows than any other programming language, but was slower. Only with the implementation of Visual Basic within the. NET scheme was able to overcome the structural weaknesses of BASIC. At the same time, this step meant the end of Visual Basic as a standalone programming language. Within the. NET scheme is in Visual Basic. NET only a language implementation among others. Exists with the introduction of the JIT compiler and. NET as the basis for all Microsoft languages ​​between the processing speed of BASIC and other programming languages ​​under. NET no great difference more.

The objective of a platform-independent programming has never met. In contrast to the well standardized C originated from BASIC hundreds dialects incompatible all to certain basic similarities to each other. The similarities are limited to the pure data processing, while each manufacturer implemented its own, tailored to the particular hardware commands for input and output during the same time rapidly running hardware development. Well structured BASIC programs in the source code often, however, can easily and quickly transferred to a variety of systems. BASIC is now considered one of the most easy to learn and to C and C widely used programming languages.

Programming language

At the beginning of the BASIC programming commands is built up as follows:

First line number command [ parameter1, parameter2 ... ] 2nd row number variable1 = variable2 Line number: A consecutive value typically in increments of 10 increases, so later rows ( with instructions ) can be added later, then get in between lying numbers. These figures are to run individual commands in the interpreter, but not urgent.

Command: Any command like INPUT.

Parameters: One or more values ​​that can be passed to a command.

The allocation of values ​​is shown in Example 2 below. The variable to be assigned a value that is in front of the equal sign; the expression whose value is to be assigned to the variable behind it.

Examples of common commands:

INPUT [ text], variable1 [, variable2, ...] - By entering the / the variables are assigned values ​​on the screen is text PRINT [Text ] - on the screen a text is shown LOCATE X, Y - Sets the current cursor position of the cursor. PSET X, Y - Draws a point on the screen CLS - Clears the display area LET [ task ] gives the computer an instruction programming Example

The following example shows a typical BASIC code. Many commands that have established themselves in modern languages ​​and modern BASIC dialects, does not yet exist in the BASIC used in the example. Thus, the programmer was forced to unstructured programming. An advantage also of old BASIC dialects, however, was that you could so easily process strings (see lines 70-90 in the example program ).

10 INPUT " Please enter your name "; A $ 20 PRINT " Good day, "; A $ 30 INPUT " How many stars do you want? "; S 35 S $ = " " 40 FOR I = 1 TO S 50 S $ = S $ " * " 55 NEXT I 60 PRINT S $ 70 INPUT "Do you want more stars? "; Q $ 80 IF LEN (Q $ ) = 0 THEN GOTO 70 90 L $ = LEFT $ (Q $, 1) 100 IF ( L $ = "Y" ) OR (L $ = "y" ) THEN GOTO 30 110 PRINT " Goodbye "; 120 FOR I = 1 TO 200 130 PRINT A $; ""; 140 NEXT I 150 PRINT standards

  • ANSI standard. ISO standard for full- Basic (ISO / IEC 10279:1991 "INFORMATION TECHNOLOGY PROGRAMMING LANGUAGES FULL BASIC" )

Most existing interpreters and compilers, however, do not comply or only partially bound by these conditions.

BASIC dialects

In addition to the standard commands there are too full and effective use of interpreters in almost all language extensions and additional functionality to the appropriate platform. Such an extended instruction set is called BASIC dialect, see List of BASIC dialects.