FACTOID # 28: Austin, Texas has more people than Alaska.
 
 Home   Encyclopedia   Statistics   States A-Z   Flags   Maps   FAQ   About 
   
 
WHAT'S NEW
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > BASIC programming language

BASIC (Beginner's All-purpose Symbolic Instruction Code[1]) is a family of high-level programming languages. Originally invented in 1964 by John George Kemeny and Thomas Eugene Kurtz at Dartmouth College, it was designed to allow students not in science fields to use computers. At the time all computer use required writing custom software, which was something only scientists and mathematicians tended to do. It became widespread on home microcomputers in the 1980s, and remains popular to this day in a handful of heavily evolved dialects. Computer code (HTML with JavaScript) in a tool that uses Syntax highlighting (colors) to help the developer see the function of each piece of code. ... For the Nintendo 64 emulator, see 1964 (Emulator). ... John George Kemeny (Kemény János) (May 31, 1926–December 26, 1992), U.S. computer scientist and educator best known for co-developing the BASIC programming language in 1964 with Thomas Eugene Kurtz. ... Thomas Eugene Kurtz (born 1928), U.S. computer scientist; co-developed the BASIC programming language in 1963/64, together with John George Kemeny. ... Dartmouth College, incorporated as Trustees of Dartmouth College, is a private academic institution in Hanover, New Hampshire, and a member of the Ivy League. ... For a List of scientists, see: List of anthropologists List of astronomers List of biologists List of chemists List of computer scientists List of economists List of engineers List of geologists List of inventors List of mathematicians List of meteorologists List of physicists Scientist pairs List of scientist pairs See... This article is in need of attention from an expert on the subject. ... TRS-80 Color Computer II The home computer is a consumer-friendly word for the second generation of microcomputers (the technical term that was previously used), entering the market in 1977 and becoming common during the 1980s. ... The 1980s decade refers to the years from 1980 to 1989, inclusive. ... A dialect (from the Greek word διάλεκτος, dialektos) is a variety of a language used by people from a particular geographic area. ...

Atari BASIC screenshot.
Atari BASIC screenshot.

Contents

Image File history File links AtariBasicExample. ... Image File history File links AtariBasicExample. ... ATARI BASIC was a ROM resident BASIC interpreter for the Atari 8-bit family of 6502-based home computers. ...


History

Background

Prior to the mid-1960s, computers were highly expensive tools used only for special-purpose tasks. In a simple form of batch processing, these machines ran only a single "job" at a time. During the 1960s, however, computer prices started to drop to where even small companies could afford them, and their speed increased to the point where they often sat idle without jobs to run. The 1960s decade refers to the years from 1960 to 1969, inclusive. ... Batch processing is the sequential execution of a series of programs (jobs) on a computer. ...


Programming languages of the era tended to be designed, like the machines on which they ran, for specific purposes (such as scientific formula processing or text editing). Since single-job machines were expensive, the tendency was to consider execution speed the most important feature of a language. In general, these specialized languages were difficult to use and used widely disparate syntax. In mathematics and in the sciences, a formula is a concise way of expressing information symbolically (as in a mathematical or chemical formula), or a general relationship between quantities. ... Notepad is the standard text editor for Microsoft Windows A text editor is a piece of computer software for editing plain text. ... Syntax, originating from the Greek words συν (syn, meaning co- or together) and τάξις (táxis, meaning sequence, order, arrangement), can in linguistics be described as the study of the rules, or patterned relations that govern the way the words in a sentence come together. ...


It was at this time that the time-sharing system concept started to become popular. In such a system the processing time of the main computer is "sliced up" and each user is given a small amount in alternation. The machines were fast enough for most users to feel they had a single machine all to themselves. In theory, timesharing reduced the cost of computing tremendously, as a single machine could be shared among hundreds of users. Alternate uses: see Timesharing Time-sharing is an approach to interactive computing in which a single computer is used to provide apparently simultaneous interactive general-purpose computing to multiple users by sharing processor time. ...


Early years — the mini computer era

The original BASIC language was invented in 1963 by John Kemeny and Thomas Kurtz and implemented by a team of Dartmouth students under their direction. BASIC was designed to allow students to write programs for the Dartmouth Time-Sharing System. BASIC was intended to address the complexity issues of older languages with a new language designed specifically for the new class of users the time-sharing systems allowed — that is, a "simpler" user who was not as interested in speed as in simply being able to use the machine. In the following years, as other dialects of BASIC appeared, Kemeny and Kurtz' original BASIC dialect became known as Dartmouth BASIC. 1963 (MCMLXIII) was a common year starting on Tuesday (link will take you to calendar). ... John George Kemeny (Kemény János) (May 31, 1926–December 26, 1992), U.S. computer scientist and educator best known for co-developing the BASIC programming language in 1964 with Thomas Eugene Kurtz. ... Thomas Eugene Kurtz (born 1928), U.S. computer scientist; co-developed the BASIC programming language in 1963/64, together with John George Kemeny. ... The Dartmouth Timesharing System, or DTSS for short, was the first large-scale time-sharing system to be implemented successfully. ... Dartmouth BASIC is the original version of the BASIC programming language. ...


The eight design principles of BASIC were:

  1. Be easy for beginners to use.
  2. Be a general-purpose programming language.
  3. Allow advanced features to be added for experts (while keeping the language simple for beginners).
  4. Be interactive.
  5. Provide clear and friendly error messages.
  6. Respond fast for small programs.
  7. Not require an understanding of computer hardware.
  8. Shield the user from the operating system.

The language was based partly on FORTRAN II and partly on ALGOL 60, with additions to make it suitable for timesharing and, later, text processing and matrix arithmetic. BASIC was first implemented on the GE-265 mainframe which supported multiple terminals. Contrary to popular belief, it was a compiled language at the time of its introduction. General-purpose programming language or General purpose Softwares refers to a type software that is suitable for most ordinary computer applications. ... There are several conceptual views of interactivity, the most general being the contingency view. ... This page is a candidate for speedy deletion. ... Fortran (also FORTRAN) is a statically typed, compiled, programming language originally developed in the 1950s and still heavily used for scientific computing and numerical computation half a century later. ... ALGOL (short for ALGOrithmic Language) is a programming language originally developed in the mid 1950s which became the de facto standard way to report algorithms in print for almost the next 30 years. ... For the square matrix section, see square matrix. ... The GE-200 series was a family of small mainframe computers of the 1960s, built by General Electric. ... A 1990 Honeywell-Bull DPS 7 mainframe Mainframes (often colloquially referred to as big iron) are large and expensive computers used mainly by government institutions and large companies for mission critical applications, typically bulk data processing such as censuses, industry/consumer statistics, ERP, and financial transaction processing. ... A computer terminal is an electronic or electromechanical hardware device used for entering data into, and displaying data from, a computer or a computing system. ... A diagram of the operation of a typical multi-language compiler. ...


The designers of the language decided that it should remain in the public domain so that the language would become widespread. They also made it available to high schools in the Dartmouth area and spent a considerable amount of effort in promoting the language. As a result, knowledge of BASIC became relatively widespread for a computer language and BASIC was implemented by a number of manufacturers, and became fairly popular on newer minicomputers like the DEC PDP series and the Data General Nova. In these instances the language tended to be implemented as an interpreter, instead of (or in addition to) a compiler. The public domain comprises the body of all creative works and other knowledge—writing, artwork, music, science, inventions, and others—in which no person or organization has any proprietary interest. ... Minicomputer (colloquially, mini) is a largely obsolete term for a class of multi-user computers which make up the middle range of the computing spectrum, in between the largest multi-user systems (traditionally, mainframe computers) and the smallest single-user systems (microcomputers or personal computers). ... Digital Equipment Corporation was a pioneering company in the American computer industry. ... Programmed Data Processor (abbreviated PDP) was the name of a series of computers, several of them ground-breaking and very influential, made by Digital Equipment Corporation. ... Data General was a firm in the minicomputer world, known primarily for their Nova 16-bit minicomputer which was used in many forms for over a decade. ... Data General SuperNova The Data General Nova was a popular 16-bit minicomputer built by the US company Data General starting in 1968. ... Interpreter can mean one of the following: In communication, an interpreter is a person whose role is to facilitate dialogue between two parties that do not use the same language. ... A diagram of the operation of a typical multi-language compiler. ...


Several years after its release, highly-respected computer professionals, notably Edsger W. Dijkstra, expressed their opinions that the use of GOTO statements, which existed in many languages including BASIC, promoted poor programming practices.[2] Some also derided BASIC as too slow or too simple. Portrait of Edsger Dijkstra (courtesy Brian Randell) Edsger Wybe Dijkstra (Rotterdam, May 11, 1930 – Nuenen, August 6, 2002) was a Dutch computer scientist. ... Goto may mean: GOTO (also known as Goto or Go to) – a branching construct in programming languages, infamous for its role in unstructured dialects of BASIC Goto, Nagasaki – a Japanese city G0-T0 (note: the characters following the G and T, respectively, are zeros), alias his coverup identity of Goto...


Explosive growth — the home computer era

Notwithstanding the language's use on several minicomputers, it was the introduction of the Altair 8800 microcomputer in 1975 that truly spread BASIC. Most programming languages were too large to fit in the small memory most users could afford on these machines, and with the slow storage on paper tape (or later audio cassette tape: disks of any kind were not available at any price for some years) and the lack of suitable text editors, a small language like BASIC was a good fit. BASIC also had the advantage that it was fairly well known to the young designers who took an interest in microcomputers at the time as a result of Kemeny and Kurtz's earlier proselytizing. One of the first to appear for this machine was Tiny BASIC, a simple BASIC implementation originally written by Dr. Li-Chen Wang, and then ported onto the Altair by Dennis Allison at the request of Bob Albrecht (who later founded Dr. Dobb's Journal). The Tiny BASIC design and the full source code were published in 1976 in DDJ. Screenshot of C64 startup screen & basic program - created to go with article This is a screenshot of copyrighted computer software. ... Screenshot of C64 startup screen & basic program - created to go with article This is a screenshot of copyrighted computer software. ... Commodore BASIC is the dialect of BASIC used in Commodore Internationals 8-bit home computer line, stretching from the PET of 1977 to the C128 of 1985. ... Image:Altair880. ... The Commodore 64 was one of the most popular microcomputers of its era. ... Tiny BASIC is a dialect of BASIC that can fit into as little as 2 or 3 KB of memory. ... Dr. Li-Chen Wang (1936 - ) wrote Palo Alto Tiny BASIC for Intel 8080-based microcomputers. ... Dr. Dobbs Journal of Computer Calisthenics & Orthodontia with the subtitle Running Light without Overbyte was the full title of the pioneer microcomputer hobbyist newsletter published from early 1976 by Bob Albrecht and Dennis Allisons Peoples Computer Company. ...

MSX BASIC version 3.0
MSX BASIC version 3.0

Newer companies attempted to follow the successes of MITS, IMSAI, North Star and Apple, thus creating the home computer revolution; meanwhile, BASIC became a standard feature of all but a very few home computers. Most came with a BASIC interpreter in ROM. Soon there were many millions of machines running BASIC around the world, likely a far greater number than all the users of all other languages put together. Image File history File links Msxbasic. ... Image File history File links Msxbasic. ... MSX BASIC is a dialect of the BASIC programming language. ... Micro Instrumentation and Telemetry Systems (MITS) was an Albuquerque, New Mexico company founded in 1968 by Ed Roberts. ... The IMSAI 8080 microcomputer, manufactured by IMS Associates, Inc. ... The North Star is a title of the star best suited for navigation northwards. ... Apple Computer, Inc. ... TRS-80 Color Computer II The home computer is a consumer-friendly word for the second generation of microcomputers (the technical term that was previously used), entering the market in 1977 and becoming common during the 1980s. ...


In 1975, Micro-Soft (then only two people — Bill Gates and Paul Allen) released Altair BASIC. The version written for the Altair was co-authored by Gates, Allen and Monte Davidoff. Versions of Microsoft BASIC then started appearing on other platforms under license, and millions of copies and variants were soon in use; it became one of the standard languages on the Apple II. By 1979, Microsoft was talking with several microcomputer vendors, including IBM, about licensing a BASIC interpreter for their computers. A version was included in the IBM PC ROM chips and PCs without floppy disks automatically booted into BASIC. 1975 (MCMLXXV) was a common year starting on Wednesday (the link is to a full 1975 calendar). ... Microsoft Corporation (NASDAQ: MSFT), (founded 1975), headquartered in Redmond, Washington, USA, is the worlds largest software company (with over 50,000 employees in various countries, as of May 2004). ... William Henry Bill Gates III, (born October 28, 1955) is the co-founder, chairman, and chief software architect of Microsoft Corporation, the worlds largest computer software company. ... Paul Allen Paul Gardner Allen (born January 21, 1953) is an entrepreneur who established himself by co-founding Microsoft Corporation with Bill Gates. ... Altair BASIC, in its first incarnation, MITS 4K BASIC, was a true milestone in software history — the first programming language for the worlds first truly personal computer, the MITS Altair 8800. ... Monte Davidoff is a programmer who helped co-write the original Altair BASIC with Bill Gates, and Paul Allen. ... Microsoft BASIC is the foundation product of the Microsoft company. ... The 1977 Apple II, with its sleek and attractive case design for its time. ... This page refers to the year 1979. ... International Business Machines Corporation (IBM, or colloquially, Big Blue) (NYSE: IBM) (incorporated June 15, 1911, in operation since 1888) is headquartered in Armonk, New York, USA. The company manufactures and sells computer hardware, software, and services. ... Read-only memory (ROM) is used as a storage medium in computers. ...


There are more dialects of BASIC than there are of any other programming language. All but a very few home computers of the 1980s had a ROM-resident BASIC interpreter. A dialect of a programming language is a (relatively small) variation or extension of the language that does not change its intrinsic nature. ... Computer code (HTML with JavaScript) in a tool that uses Syntax highlighting (colors) to help the developer see the function of each piece of code. ... TRS-80 Color Computer II The home computer is a consumer-friendly word for the second generation of microcomputers (the technical term that was previously used), entering the market in 1977 and becoming common during the 1980s. ... Read-only memory (ROM) is used as a storage medium in computers. ... An interpreter is a computer program that executes other programs. ...


The BBC published BBC BASIC, developed for them by Acorn Computers Ltd, incorporating many extra structuring keywords, as well as comprehensive and versatile direct access to the operating system. It also featured a fully integrated assembler. Corporate logo of the British Broadcasting Corporation The British Broadcasting Corporation (BBC) is the national public service broadcaster of the United Kingdom (see British television). ... BBC BASIC was developed in 1981 as a native programming language for the MOS Technology 6502 based Acorn BBC Micro home/personal computer, mainly by Roger Wilson. ... Acorn Computers Ltd. ...


Maturity — the personal computer era

GW-BASIC 3.22
Enlarge
GW-BASIC 3.22
Microsoft QuickBASIC 4.5
Microsoft QuickBASIC 4.5

Many newer BASIC versions were created during this period. Microsoft sold several versions of BASIC for MS-DOS/PC-DOS including BASICA, GW-BASIC (a BASICA-compatible version that did not need IBM's ROM) and Quick BASIC. Turbo Pascal-publisher Borland published Turbo BASIC 1.0 in 1985 (successor versions are still being marketed by the original author under the name PowerBASIC). Image File history File links GW-BASIC 3. ... Image File history File links GW-BASIC 3. ... GW-BASIC 3. ... Image File history File links QuickBASIC 4. ... Image File history File links QuickBASIC 4. ... Microsoft QuickBASIC 4. ... Microsofts disk operating system, MS-DOS, was Microsofts implementation of DOS, which was the first popular operating system for the IBM PC, and until recently, was widely used on the PC compatible platform. ... IBM PC-DOS was one of the three major operating systems that dominated the personal computer market from about 1985 to 1995. ... Microsoft BASICA (short for Advanced BASIC) is a simple disk-based BASIC interpreter written by Microsoft for PC-DOS. BASICA allows use of the ROM-resident BASIC on the PC while DOS is loaded (the ROM BASIC itself runs when nothing is loaded when booting) and adds functionality such as... GW-BASIC (named after Greg Whitten, an early Microsoft employee and is known more affectionately as gee-whiz) was a dialect of BASIC developed by Microsoft, originally for Compaq. ... Microsoft QuickBASIC 4. ... Borland Software Corporation (formerly Borland International, Inc. ... This article is about the Borland version of Turbo-Basic Turbo Basic XL - a dialect of BASIC for the Atari 8-bit family. ... PowerBASIC is a variant of the BASIC programming language. ...


These languages introduced many extensions over home computer BASIC, such as improved string manipulation and graphics support, access to the file system and additional data types. More important were the facilities for structured programming, including additional control structures and proper subroutines supporting local variables. String manipulation is the process in computer programming languages for handling, matching, parsing, searching or formatting of character strings. ... In computing, a file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. ... On computer science, a datatype (often simply type) is a name or label for a set of values and some operations which can be performed on that set of values. ... Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. ... Control Structures: In computer science, structured algorithms are built using control structures. ... In computer science, a subroutine (function, procedure, or subprogram) is a sequence of code which performs a specific task, as part of a larger program, and is grouped as one or more statement blocks; such code is sometimes collected into software libraries. ... In computer science, a local variable is a variable that is given local scope. ...


However, by the latter half of the 1980s newer computers were far more complex. At the same time, computers had progressed from a hobbyist interest to tools used primarily for applications written by others, and programming as a whole became less important for the growing majority of users. BASIC started to fade, though numerous versions remained available. The 1980s decade refers to the years from 1980 to 1989, inclusive. ...


BASIC's fortune reversed once again with the introduction of Visual Basic from Microsoft. Though it is somewhat difficult to consider this language to be BASIC, because of the significant shift in paradigm towards an object-oriented and event-driven language. While this could be considered an evolution of the language, few of the features of Dartmouth BASIC, such as line numbers and the INPUT keyword, remain. The four colored boxes is the logo of VBA, and the two drums above them symbolize database connectivity Visual Basic (VB) is an event driven programming language and associated development environment created by Microsoft. ... In computer science, object-oriented programming, OOP for short, is a computer programming paradigm. ... Event-driven programming is a computer programming paradigm. ... Dartmouth BASIC is the original version of the BASIC programming language. ...


Many BASIC dialects have also sprung up in the last few years, including Bywater BASIC, True BASIC and REALbasic. Many other BASIC variants and adaptations are authored by hobbyists, equipment developers, and others, as it is relatively easy to develop interpreters and compilers for BASIC. Bywater BASIC (aka bwBASIC) is a GPL BASIC interpreter by Ted A. Campbell for MS-DOS and POSIX. It supports a large set of the ANSI Standard for Minimal BASIC and a large subset of the ANSI Standard for Full BASIC. Bywater BASIC is implemented in C. It currently is... True BASIC is a fully structured variant of the BASIC programming language descended from Dartmouth BASIC – the original BASIC – invented by college professors John G. Kemeny and Thomas E. Kurtz. ... REALbasic, commonly known as RB, is an object-oriented dialect of the BASIC programming language developed and commercially marketed by REAL Software, Inc in Austin, Texas for Mac OS X, Microsoft Windows, and Linux. ...


The language

Syntax

Basic statements are terminated by line endings unless there is a line continuation character. A very minimal BASIC syntax only needs the LET, PRINT, IF and GOTO commands. Goto may mean: GOTO (also known as Goto or Go to) – a branching construct in programming languages, infamous for its role in unstructured dialects of BASIC Goto, Nagasaki – a Japanese city G0-T0 (note: the characters following the G and T, respectively, are zeros), alias his coverup identity of Goto...


Line numbers were a very distinctive aspect of classic home computer BASIC. Some BASIC interpreters later appeared with a built-in RENUMBER command.


Some (but not all) modern BASIC dialects have abandoned line numbers, and support most (or all) of the structured control and data declaration constructs known in other languages like C and Pascal (note also that some advanced versions of line number-based home computer BASICs incorporated such constructs as these to good effect): The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a standardized imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the Unix operating system. ... Pascal is an imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ...

  • do - loop - while - until - exit
  • on x goto / gosub (switch & case)

Recent variants such as Visual Basic have introduced object-oriented features, such as the For Each...Loop construct for looping through collections and arrays in VBA and Visual Basic 4 and later, and even inheritance in the latest version. Memory management is easier than in many other procedural programming languages because of the commonly included garbage collector (presumably for which, however, one pays a run-time performance penalty). The four colored boxes is the logo of VBA, and the two drums above them symbolize database connectivity Visual Basic (VB) is an event driven programming language and associated development environment created by Microsoft. ... Object-oriented programming (OOP) is a computer programming paradigm in which a software system is modeled as a set of objects that interact with each other. ... In object-oriented programming of computer science, an inheritance is a way to form new classes (instances of which will be objects) using pre-defined objects or classes where new ones simply take over old ones implementations and characteristics. ... In computer science, garbage collection (also known as GC) is a form of automatic memory management. ...


This wealth of variants shows that the language is an "organic" one and that it may be seen as a subculture dealing with computer programming rather than as a fixed set of syntactic rules. This applies as well to other "old" computer languages like COBOL and FORTRAN, although the BASIC movement is by far the largest; this may be explained by the large number of IT professionals who learned to program in BASIC during the home computer era in the 1980s. COBOL is a third-generation programming language. ... Fortran (also FORTRAN) is a computer programming language originally developed in the 1950s; it is still used for scientific computing and numerical computation half a century later. ...


Procedures and flow control

BASIC does not have a standard external library like other languages such as C. Instead, the interpreter (or compiler) contains an extensive built-in library of intrinsic procedures. These procedures include most of the tools a programmer needs to learn programming and write simple applications, including functions for math, strings, console input/output, graphics and file manipulation.


Some BASIC dialects do not allow programmers to write their own procedures. Programmers must instead write their programs with large numbers of GOTO statements for branching. This can result in very confusing source, commonly referred to as spaghetti code. GOSUB statements branch to simple kinds of subroutines without (sometimes with) parameters or local variables. Most modern versions of BASIC such as Microsoft QuickBASIC have added support for full subroutines and functions. This is another area where BASIC differs from many other programming languages. BASIC, like Pascal, makes a distinction between a procedure which does not return a value (called a subroutine) and a procedure which does (called a function). Many other languages (notably C) make no distinction and consider everything a function (with some returning a "void" value). Goto may mean: GOTO (also known as Goto or Go to) – a branching construct in programming languages, infamous for its role in unstructured dialects of BASIC Goto, Nagasaki – a Japanese city G0-T0 (note: the characters following the G and T, respectively, are zeros), alias his coverup identity of Goto... A plate of spaghetti looks twisted and tangled, which is where the name for spaghetti code comes from. ... In computer science, a subroutine (function, procedure, or subprogram) is a sequence of code which performs a specific task, as part of a larger program, and is grouped as one or more statement blocks; such code is sometimes collected into software libraries. ... Microsoft QuickBASIC 4. ...


While functions in the larger sense of subroutines returning values were a latecomer to BASIC dialects, many early systems supported the definition of one-line mathematical functions by DEF FN ("DEFine FunctioN"). The original Dartmouth BASIC also supported Algol-like functions and subroutines from an early date.


Data types

BASIC is well known for good string manipulation functions. Early dialects already had a set of fundamental functions (LEFT$, MID$, RIGHT$) to deal with strings easily. Because strings are often used in everyday applications this was a considerable advantage over other languages at the time of its introduction. In various branches of mathematics and computer science, strings are sequences of various simple objects (symbols, tokens, characters, etc. ...


The original Dartmouth BASIC supported only numeric and string data types. There was no integer type. All numeric variables were floating point. Strings were dynamic in length. Arrays of both numbers and strings were supported, as well as matrices (two dimensional arrays). In computer science, the term integer is used to refer to any data type which can represent some subset of the mathematical integers. ... A floating-point number is a digital representation for a number in a certain subset of the rational numbers, and is often used to approximate an arbitrary real number on a computer. ... In computer programming, an array, also known as a vector or list, is one of the simplest data structures. ...


Every modern BASIC dialect at least has the integer and string data types. Data types are usually distinguished by a suffixed character; string identifiers end in $, whereas integers classically ended with a '%'. In some dialects, variables must be declared (with DIM) on their first usage; other dialects do not require it, but can optionally enforce it—typically using a directive such as Option Explicit (in VB.NET it is on by default but can be turned off using Option Explicit Off). Many dialects also support such additional types as 16- and 32-bit integers and floating-point numbers. Some have "polynomial", "complex", "list", and specialized types for the intended use of the implementation. Additionally, some allow user-defined types similar to Pascal "records" or C "structs". Visual Basic . ... This article is about the data structure. ...


Most BASIC dialects beyond the most primitive also support arrays of integers or other types. In some, arrays must be pre-allocated (with the DIM statement) before they can be used. Support for two- and higher-dimensional arrays, as well as arrays of non-integer types, is common.

 Visual Basic .NET DIM myIntArray (100) AS INTEGER DIM myStringArray (50) AS STRING 

Depending on the dialect of BASIC, the resulting available elements in the array can vary. In some, commands similar to the first in the example will define a 101-element array of integers with elements from 0-100, others may define a 100-element array of integers with elements 1-100 or, rarely, 0-99. It may also be possible to set a default beginning element number other than 0 or 1 with an additional command such as Option Base. The Visual Basic .NET example will create an array from 0-100.


When working with strings, commands similar to the second may allocate a 50-element array of variable-length strings, or may allocate a single string of 50 characters. Note that they are also subject to the numerical differences mentioned above.


These non-standard and, to some, less than intuitive dimensioning can often trip up the novice (and even the advanced) programmer. Newer dialects offer specific dimensioning, such as DIM myIntArray (10 TO 20) AS INTEGER which would be an 11-element array from 10-20.


Relational, logical operators

 = equal <= less than or equal NOT logical negation <> not equal >= greater than or equal AND logical conjunction < less than OR logical disjunction > greater than 

Note that there is no lexical distinction between the assignment operator and the equality operator in BASIC; a single equal sign is used for both. There is, however, a method available to the programmer if a visible difference between the two is wanted: the optional LET keyword allows for assignments to be clearly and unambiguously distinguished from the use of the equality operator. Example: IF X=7 THEN LET Y=3. See also the disambiguation page title equality. ...


Examples

Hello, world!

 10 PRINT "Hello, world!" 20 END 

Classic BASIC

Classic BASIC. Note that this example is actually well structured, demonstrating that use of the GOTO statement does not necessarily lead to an unstructured program.

 10 INPUT "What is your name: "; U$ 20 PRINT "Hello "; U$ 30 REM 40 INPUT "How many stars do you want: "; N 50 S$ = "" 60 FOR I = 1 TO N 70 S$ = S$ + "*" 80 NEXT I 90 PRINT S$ 100 REM 110 INPUT "Do you want more stars? "; A$ 120 IF LEN(A$) = 0 THEN GOTO 110 130 A$ = LEFT$(A$, 1) 140 IF (A$ = "Y") OR (A$ = "y") THEN GOTO 40 150 PRINT "Goodbye "; 160 FOR I = 1 TO 200 170 PRINT U$; " "; 180 NEXT I 190 PRINT 

Modern BASIC

"Modern" structured BASIC (for example, QuickBASIC and PowerBASIC), replacing GOTO statements by more modern keywords. Microsoft QuickBASIC 4. ... PowerBASIC is a dialect of the BASIC programming language. ...

 INPUT "What is your name"; UserName$ PRINT "Hello "; UserName$ DO INPUT "How many stars do you want"; NumStars Stars$ = "" Stars$ = REPEAT$("*", NumStars) ' <- ANSI BASIC --or-- Stars$ = STRING$(NumStars, "*") ' <- MS BASIC PRINT Stars$ DO INPUT "Do you want more stars"; Answer$ LOOP UNTIL Answer$ <> "" Answer$ = LEFT$(Answer$, 1) LOOP WHILE UCASE$(Answer$) = "Y" PRINT "Goodbye "; FOR I = 1 TO 200 PRINT UserName$; " "; NEXT I PRINT 

See also

xdegrtymjyu./ol;'m; Business Basic is an interactive high-level programming language developed for minicomputer systems in the early 1970s. ... This article gives an alphabetical list of BASIC dialects—a flat list of interpreted as well as compiled variants on the BASIC programming language. ... List of BASIC dialects by platform: This is a list of dialects of the BASIC computer programming language, sorted into groups for better conceptual organization. ...


Notes

  1. ^ The acronym is tied to the name of an unpublished paper by Thomas Kurtz and is not a backronym.
  2. ^ In a 1968 article, Dutch computer scientist Edsger Dijkstra considered programming languages using GOTO statements for program structuring purposes harmful for the productivity of the programmer as well as the quality of the resulting code ("Go To Statement Considered Harmful", Communications of the ACM Volume 11, 147-148. 1968). This article does not mention any particular programming language; instead it states that the overuse of GOTO is a bad thing and gives the technical reasons why this should be so.
    In a 1975 tongue-in-cheek article, "How do We Tell Truths that Might Hurt", Sigplan Notices Volume 17 No. 5, Dijkstra gives a list of uncomfortable "truths", including his opinion of several programming languages of the time, such as BASIC. It appears that many people confuse the two articles and conclude that he particularly hated BASIC as a result of its GOTO statement. However, BASIC receives no worse treatment than PL/I, COBOL or APL in his articles.

A backronym or bacronym is a type of acronym that is formed to match the letters of a word already in use. ... Portrait of Edsger Dijkstra (courtesy Brian Randell) Edsger Wybe Dijkstra (Rotterdam, May 11, 1930 – Nuenen, August 6, 2002) was a Dutch computer scientist. ... Goto may mean: GOTO (also known as Goto or Go to) – a branching construct in programming languages, infamous for its role in unstructured dialects of BASIC Goto, Nagasaki – a Japanese city G0-T0 (note: the characters following the G and T, respectively, are zeros), alias his coverup identity of Goto... PL/I (Programming Language One, pronounced pee el one) is an imperative computer programming language designed for scientific, engineering, and business applications. ... COBOL is a third-generation programming language. ... APL (for A Programming Language, or sometimes Array Processing Language) is an array programming language based on a notation invented in 1957 by Kenneth E. Iverson while at Harvard University. ...

References

  • Dartmouth College Computation Center (1964). A Manual for BASIC, the elementary algebraic language designed for use with the Dartmouth Time Sharing System. The original Dartmouth BASIC manual.
  • Lien, David A. (1986). The Basic Handbook: Encyclopedia of the BASIC Computer Language (3rd ed.). Compusoft Publishing. ISBN 0932760333. Documents dialect variations for over 250 versions of BASIC.
  • Kemeny, John G.; Kurtz, Thomas E. (1985). Back To BASIC: The History, Corruption, and Future of the Language. Addison-Wesley. 141 pp. ISBN 0-201-13433-0.
  • Jean E. Sammet. Programming languages: History and fundamentals. Prentice-Hall, Englewood Cliffs, N.J. 1969.

Standards

  • ANSI/ISO/IEC Standard for Minimal BASIC:
    • ANSI X3.60-1978 "FOR MINIMAL BASIC"
    • ISO/IEC 6373:1984 "DATA PROCESSING - PROGRAMMING LANGUAGES - MINIMAL BASIC"
  • ANSI/ISO/IEC Standard for Full BASIC:
    • ANSI X3.113-1987 "PROGRAMMING LANGUAGES FULL BASIC"
    • ISO/IEC 10279:1991 "INFORMATION TECHNOLOGY - PROGRAMMING LANGUAGES - FULL BASIC"
  • ANSI/ISO/IEC Addendum Defining Modules:
    • ANSI X3.113 INTERPRETATIONS-1992 "BASIC TECHNICAL INFORMATION BULLETIN # 1 INTERPRETATIONS OF ANSI 03.113-1987"
    • ISO/IEC 10279:1991/ Amd 1:1994 "MODULES AND SINGLE CHARACTER INPUT ENHANCEMENT"

External links


  Results from FactBites:
 
Encyclopedia4U - BASIC programming language - Encyclopedia Article (2767 words)
The original BASIC language was invented in 1964 by John George Kemeny (1926-93) and Thomas Eugene Kurtz (1928-) at Dartmouth College.
BASIC intended to address the complexity issues of older languages with a new language designed specifically for the new class of users the time-sharing systems allowed – that is, a "simpler" user who was not as interested in speed as in simply being able to use the machine.
Although it is somewhat difficult to consider this language to be BASIC (despite its using many familiar BASIC keywords) it has gone on to become one of the most used languages on the Windows platform, and is said to represent some 70 to 80% of all commercial development.
BASIC programming language - Wikipedia, the free encyclopedia (2730 words)
As a result, knowledge of BASIC became relatively widespread for a computer language and BASIC was implemented by a number of manufacturers, and became fairly popular on newer minicomputers like the DEC PDP series and the Data General Nova.
Notwithstanding the language's use on several minicomputers, it was the introduction of the Altair 8800 microcomputer in 1975 that truly spread BASIC.
Though it is somewhat difficult to consider this language to be BASIC, because of the significant shift in paradigm towards an object-oriented and event-driven language.
  More results at FactBites »

 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m