basic basic an acronym for beginners allpurpose symbolic instruction code is a family of generalpurpose highlevel programming languages whose design philosophy emphasizes ease of use in 1964 john g kemeny and thomas e kurtz designed the original basic language at dartmouth college they wanted to enable students in fields other than science and mathematics to use computers at the time nearly all use of computers required writing custom software which was something only scientists and mathematicians tended to learn in addition to the language itself kemeny and kurtz developed the dartmouth time sharing system dtss which allowed multiple users to edit and run basic programs at the same time this general model became very popular on minicomputer systems like the pdp11 and data general nova in the late 1960s and early 1970s hewlettpackard produced an entire computer line for this method of operation introducing the hp2000 series in the late 1960s and continuing sales into the 1980s many early video games trace their history to one of these versions of basic the emergence of early microcomputers in the mid1970s led to the development of the original microsoft basic in 1975 due to the tiny main memory available on these machines often 4kb a variety of tiny basic dialects were also created basic was available for almost any system of the era and naturally became the de facto programming language for the home computer systems that emerged in the late 1970s these machines almost always had a basic installed by default often in the machines firmware or sometimes on a rom cartridge basic fell from use during the later 1980s as newer machines with far greater capabilities came to market and other programming languages such as pascal and c became tenable in 1991 microsoft released visual basic combining a greatly updated version of basic with a visual forms builder this reignited use of the language and vb remains a major programming language to this day in the form of vbnet origin john g kemeny was the math department chairman at dartmouth college and largely on his reputation as an innovator in math teaching in 1959 they won an alfred p sloan foundation award for 500000 to build a new department building kemeny and kurtz had made two previous experiments with simplified languages darsimco dartmouth simplified code and dope dartmouth oversimplified programming experiment these did not progress past a single freshman class new experiments using fortran and algol followed but kurtz concluded these languages were too tricky for what they desired as kurtz noted fortran had numerous oddlyformed commands notably an almost impossibletomemorize convention for specifying a loop do 100 i 1 10 2 is it 1 10 2 or 1 2 10 and is the comma after the line number required or not moreover the lack of any sort of immediate feedback was a key problem the machines of the era used batch processing and took long times to complete a run of a program kurtz suggested that time sharing offered a solution a single machine could divide up its processing time among many users giving them the illusion of having a slow computer to themselves small programs would return results in a few seconds this led to increasing interest in a system using timesharing and a new language specifically for use by nonstem students kemeny wrote the first version of basic the acronym basic comes from the name of an unpublished paper by thomas kurtz the project received a 300000 grant from the national science foundation which was used to purchase a ge225 computer for processing and a datanet30 realtime processor to handle the teletype model 33 teleprinters used for input and output a team of a dozen undergraduates worked on the project for about a year writing both the dtss system and the basic compiler and still later by a ge635 the first version basic language was released on 1 may 1964 one of the graduate students on the implementation team was sr mary kenneth keller one of the first people in the us to earn a phd in computer science and the first woman to do so initially basic concentrated on supporting straightforward mathematical work with matrix arithmetic support from its initial implementation as a batch language and character string functionality being added by 1965 wanting use of the language to become widespread its designers made the compiler available free of charge in the 1960s software became a chargeable commodity until then it was provided without charge as a service with the very expensive computers usually available only to lease they also made it available to high schools in the hanover new hampshire area and put considerable effort into promoting the language in the following years as other dialects of basic appeared kemeny and kurtzs original basic dialect became known as dartmouth basic spread on minicomputers train basic every day reads a poster bottom center in a russian school ca 19851986 knowledge of the relatively simple basic became widespread for a computer language and it was implemented by a number of manufacturers becoming fairly popular on newer minicomputers such as the dec pdp series where basicplus was an extended dialect for use on the rstse timesharing operating system the basic language was available for the data general nova and also central to the hp timeshared basic system in the late 1960s and early 1970s where the language was implemented as an interpreter a version was a core part of the pick operating system from 1973 onward where a compiler renders it into bytecode able to be interpreted by a virtual machine during this period a number of simple computer games were written in basic most notably mike mayfields star trek a number of these were collected by dec employee david h ahl and published in a newsletter he compiled he later collected a number of these into book form 101 basic computer games published in 1973 explosive growth the home computer era commodore basic v20 on the commodore 64 msx basic version 30 the introduction of the first microcomputers in the mid1970s was the start of explosive growth for basic it had the advantage that it was fairly well known to the young designers and computer hobbyists who took an interest in microcomputers despite dijkstras famous judgement in 1975 it is practically impossible to teach good programming to students that have had a prior exposure to basic as potential programmers they are mentally mutilated beyond hope of regeneration basic was one of the few languages that was both highlevel enough to be usable by those without training and small enough to fit into the microcomputers of the day making it the de facto standard programming language on early microcomputers one of the first basics to appear was tiny basic a simple basic variant designed by dennis allison at the urging of bob albrecht of the homebrew computer club he had seen basic on minicomputers and felt it would be the perfect match for new machines like the mits altair 8800 how to design and implement a strippeddown version of an interpreter for the basic language was covered in articles by allison in the first three quarterly issues of the peoples computer company newsletter published in 1975 and implementations with source code published in dr dobbs journal of tiny basic calisthenics orthodontia running light without overbyte versions were written by lichen wang and tom pittman which eventually grew into corporate giant microsoft the first altair version was cowritten by gates allen and monte davidoff almost universally home computers of the 1980s had a romresident basic interpreter which the machines booted directly into when the apple ii pet 2001 and trs80 were all released in 1977 all three had basic as their primary programming language and operating environment upon boot a basic interpreter in immediate mode was presented not the commandline interface used on systems running cpm or msdos commodore business machines included a version of microsoft basic the apple ii and trs80 each had two versions of basic a smaller introductory version introduced with the initial releases of the machines and a more advanced version developed as interest in the platforms increased as new companies entered the field additional versions were added that subtly changed the basic family the atari 8bit family had its own atari basic that was modified in order to fit on an 8kb rom cartridge sinclair basic was introduced in 1980 with the sinclair zx80 and was later extended for the sinclair zx81 and the sinclair zx spectrum the bbc published bbc basic developed by acorn computers ltd incorporating many extra structured programming keywords and advanced floatingpoint operation features as the popularity of basic grew in this period computer magazines published complete source code in basic for video games utilities and other programs given basics straightforward nature it was a simple matter to type in the code from the magazine and execute the program different magazines were published featuring programs for specific computers though some basic programs were considered universal and could be used in machines running any variant of basic sometimes with minor adaptations many books of typein programs were also available and in particular ahl published versions of the original 101 basic games converted into the microsoft dialect and published it from creative computing as basic computer games this book and its sequels provided hundreds of readytogo programs that could be easily converted to practically any basicrunning platform ibm pc and compatibles ibm cassette basic 110 when ibm was designing the ibm pc they followed the paradigm of existing home computers in wanting to have a builtin basic they sourced this from microsoft ibm cassette basic but microsoft also produced several other versions of basic for msdospc dos including ibm disk basic basic d ibm basica basic a gwbasic a basicacompatible version that did not need ibms rom and qbasic all typically bundled with the machine in addition they produced the microsoft basic compiler aimed at professional programmers turbo pascalpublisher borland published turbo basic 10 in 1985 successor versions are still being marketed by the original author under the name powerbasic microsoft wrote the windowed amigabasic that was supplied with version 11 of the preemptive multitasking gui amiga computers late 1985 early 1986 although the product unusually did not bear any microsoft marks these languages introduced many extensions to the original homecomputer 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 however by the latter half of the 1980s users were increasingly using premade applications written by others rather than learning programming themselves while professional programmers now had a wide range of more advanced languages available on small computers c and later c became the languages of choice for professional shrink wrap application development visual basic in 1991 microsoft introduced visual basic an evolutionary development of quickbasic it included constructs from that language such as blockstructured control statements parameterized subroutines and optional static typing as well as objectoriented constructs from other languages such as with and for each the language retained some compatibility with its predecessors such as the dim keyword for declarations gosubreturn statements and optional line numbers which could be used to locate errors an important driver for the development of visual basic was as the new macro language for microsoft excel a spreadsheet program to the surprise of many at microsoft who still initially marketed it as a language for hobbyists the language came into widespread use for small custom business applications shortly after the release of vb version 30 which is widely considered the first relatively stable version while many advanced programmers still scoffed at its use vb met the needs of small businesses efficiently wherever ease of development was more of a concern than processing speed by that time computers running windows 31 had become fast enough that many businessrelated processes could be completed in the blink of an eye even using a slow language as long as large amounts of data were not involved many small business owners found they could create their own small yet useful applications in a few evenings to meet their own specialized needs eventually during the lengthy lifetime of vb3 knowledge of visual basic had become a marketable job skill microsoft also produced vbscript in 1996 and visual basic net in 2001 the latter has essentially the same power as c and java but with syntax that reflects the original basic language three modern basic variants mono basic openofficeorg basic and gambas post1990 versions and dialects many other basic dialects have also sprung up since 1990 including the open source qb64 and freebasic inspired by qbasic and the visual basicstyled rapidq basic for qt and gambas modern commercial incarnations include purebasic powerbasic xojo monkey x and true basic the direct successor to dartmouth basic from a company controlled by kurtz several webbased simple basic interpreters also now exist including quite basic and microsofts small basic educational software versions of basic have been showing up for use on smartphones and tablets apple app store contains such implementations of basic programming language as smart basic basic hotpaw basic basicii techbasic and others android devices feature such implementations of basic as rfo basic and mintoris basic applications for some mobile computers with proprietary os cipherlab can be built with programming environment based on basic an application for the nintendo 3ds and nintendo dsi called petit computer allows for programming in a slightly modified version of basic with ds button support a 3ds sequel was released in japan november 2014 in north america october 2015 and in europe august 2017 calculators variants of basic are available on graphing and otherwise programmable calculators made by texas instruments hp casio and others windows command line qbasic a version of microsoft quickbasic without the linker to make exe files is present in the windows nt and doswindows 95 streams of operating systems and can be obtained for more recent releases like windows 7 which do not have them prior to dos 5 the basic interpreter was gwbasic quickbasic is part of a series of three languages issued by microsoft for the home and office power user and small scale professional development quickc and quickpascal are the other two for windows 95 and 98 which do not have qbasic installed by default they can be copied from the installation disc which will have a set of directories for old and optional software other missing commands like exe2bin and others are in these same directories other basic came to some video game systems such as the nintendo famicom the various microsoft lotus and corel office suites and related products are programmable with visual basic in one form or another including lotusscript which is very similar to vba 6 the host explorer terminal emulator uses wwb as a macro language or more recently the programme and the suite in which it is contained is programmable in an inhouse basic variant known as hummingbird basic the vbscript variant is used for programming web content outlook 97 internet explorer and the windows script host wsh also has a visual basic for applications vba engine installed as the third of the default engines along with vbscript jscript and the numerous proprietary or open source engines which can be installed like perlscript a couple of rexxbased engines python ruby tcl delphi xlnt php and others meaning that the two versions of basic can be used along with the other mentioned languages as well as lotusscript in a wsf file through the component object model and other wsh and vba constructions vbscript is one of the languages that can be accessed by the 4dos 4nt and take command enhanced shells saxbasic and wwb are also very similar to the visual basic line of basic implementations the preoffice 97 macro language for microsoft word is known as wordbasic excel 4 and 5 use visual basic itself as a macro language chipmunk basic an old school interpreter similar to basics of the 1970s is available for gnulinux microsoft windows and macos nostalgia the ubiquity of basic interpreters on personal computers was such that textbooks once included simple try it in basic exercises that encouraged students to experiment with mathematical and computational concepts on classroom or home computers popular computer magazines of the day typically included typein programs futurist and scifi writer david brin mourned the loss of ubiquitous basic in a 2006 salon article dartmouth college celebrated the 50th anniversary of the basic language with a day of events syntax typical basic keywords data manipulation letassigns a value which may be the result of an expression to a variable dataholds a list of values which are assigned sequentially using the read command program flow control if then elseused to perform comparisons or make decisions for to step nextrepeat a section of code a given number of times a variable that acts as a counter is available within the loop while wend and repeat untilrepeat a section of code while the specified condition is true the condition may be evaluated before each iteration of the loop or after do loop while or untilrepeat a section of code forever or whileuntil the specified condition is true the condition may be evaluated before each iteration of the loop or after gotojumps to a numbered or labelled line in the program gosubjumps to a numbered or labelled line executes the code it finds there until it reaches a return command on which it jumps back to the operator following the gosub either after a colon or on the next line this is used to implement subroutines on gotogosubchooses where to jump based on the specified conditions see switch statement for other forms def fna pair of keywords introduced in the early 1960s to define functions the original basic functions were modeled on fortran singleline functions basic functions were one expression with variable arguments rather than subroutines with a syntax on the model of def fndx xx at the beginning of a program function names were originally restricted to fnone letter input and output listdisplays all inputted code printdisplays a message on the screen or other output device inputasks the user to enter the value of a variable the statement may include a prompt message tab or at sets the position where the next character will be shown on the screen or printed on paper list of functions absabsolute value atnarctangent value result in radians coscosine value argument in radians expexponential value intinteger value lognatural logarithmic value rndrandom value sinsine value argument in radians sqrsquare root value tantangent value argument in radians miscellaneous remholds a programmers comment or remark often used to give a title to the program and to help identify the purpose of a given section of code usrtransfers program control to a machine language subroutine usually entered as an alphanumeric string or in a list of data statements tronturns on display of each line number as it is run trace on this was useful for debugging or correcting of problems in a program troffturns off the display line numbers asmsome compilers such as freebasic also support inline assembly language allowing the programmer to intermix highlevel and lowlevel code typically prefixed with asm or statements data types and variables minimal versions of basic had only integer variables and one or twoletter variable names which minimized requirements of limited and expensive memory ram more powerful versions had floatingpoint arithmetic and variables could be labelled with names six or more characters long there were some problems and restrictions in early implementations for example applesoft allowed variable names to be several characters long but only the first two were significant thus it was possible to inadvertently write a program with variables loss and loan which would be treated as being the same assigning a value to loan would silently overwrite the value intended as loss keywords could not be used in variables in many early basics score would be interpreted as sc or e where or was a keyword string variables are usually distinguished in many microcomputer dialects by having suffixed to their name and values are often identified as strings by being delimited by double quotation marks arrays in basic could contain integers floating point or string variables some dialects of basic supported matrices and matrix operations useful for the solution of sets of simultaneous linear algebraic equations these dialects would directly support matrix operations such as assignment addition multiplication of compatible matrix types and evaluation of a determinant many microcomputer basics did not support this data type matrix operations were still possible but had to be programmed explicitly on array elements examples unstructured basic the original dartmouth basic was unusual in having a matrix keyword mat which averages the numbers that are input 5 let s 0 10 mat input v 20 let n num 30 if n 0 then 99 40 for i 1 to n 45 let s s vi 50 next i 60 print sn 70 go to 5 99 end new basic programmers on a home computer might start with a simple program perhaps using the languages print statement to display a message on the screen a wellknown and oftenreplicated example is kernighan and ritchies hello world program 10 print hello world 20 end an infinite loop could be used to fill the display with the message most firstgeneration basic versions such as msx basic and gwbasic supported simple data types loop cycles and arrays the following example is written for gwbasic but will work in most versions of basic with minimal changes 10 input what is your name u 20 print hello u 30 input how many stars do you want n 40 s 50 for i 1 to n 60 s s 70 next i 80 print s 90 input do you want more stars a 100 if lena 0 then goto 90 110 a lefta 1 120 if a y or a y then goto 30 130 print goodbye u 140 end the resulting dialog might resemble what is your name mike hello mike how many stars do you want 7 do you want more stars yes how many stars do you want 3 do you want more stars no goodbye mike structured basic secondgeneration basics for example vax basic superbasic true basic quickbasic bbc basic pick basic powerbasic and arguably comal introduced a number of features into the language primarily related to structured and procedureoriented programming usually line numbering is omitted from the language and replaced with labels for goto and procedures to encourage easier and more flexible design in addition keywords and structures to support repetition selection and procedures with local variables were introduced the following example is in quickbasic declare sub printsomestars starcount rem quickbasic example input what is your name username print hello username do input how many stars do you want numstars call printsomestarsnumstars do input do you want more stars answer loop until answer answer leftanswer 1 loop while ucaseanswer y print goodbye username end sub printsomestars starcount rem this procedure uses a local variable called stars stars stringstarcount print stars end sub objectoriented basic thirdgeneration basic dialects such as visual basic xojo staroffice basic and blitzmax introduced features to support objectoriented and eventdriven programming paradigm most builtin procedures and functions are now represented as methods of standard objects rather than operators also the operating system became more and more available to the basic language the following example is in visual basic net public module starsprogram private function askprompt as string as string consolewriteprompt return consolereadline end function public sub main dim username askwhat is your name consolewritelinehello 0 username dim answer as string do dim numstars cintaskhow many stars do you want dim stars as new stringc numstars consolewritelinestars do answer askdo you want more stars loop until answer loop while answerstartswithy stringcomparisonordinalignorecase consolewritelinegoodbye 0 username end sub end module standards ansiisoiec standard for minimal basic ansi x3601978 for minimal basic isoiec 63731984 data processing programming languages minimal basic ecma55 minimal basic withdrawn similar to ansi x3601978 ansiisoiec standard for full basic ansi x31131987 programming languages full basic incitsisoiec 102791991 r2005 information technology programming languages full basic ansiisoiec addendum defining modules ansi x3113 interpretations1992 basic technical information bulletin 1 interpretations of ansi 031131987 isoiec 102791991 amd 11994 modules and single character input enhancement ecma116 basic withdrawn similar to ansi x31131987 basic portal list of basic dialects list of computers with onboard basic notes general references sammet jean e 1969 programming languages history and fundamentals englewood cliffs nj prenticehall oclc819683527 kurtz thomas e 1981 basic in wexelblat richard history of programming languages i new york acm pp515537 doi1011458000251198404 inactive 20180911 isbn9780127450407 kemeny john g kurtz thomas e 1985 back to basic the history corruption and future of the language addisonwesley p141 isbn9780201134339 oclc11399298 lien david a 1986 the basic handbook encyclopedia of the basic computer language 3rd ed compusoft publishing isbn9780932760333 oclc12548310 fifty years of basic the programming language that made computers personal time 29 april 2014 wikibooks has a book on the topic of programmingbasic basic at curlie basic beginners allpurpose symbolic instruction code the encyclopedia of computer languages murdoch university the birth of basic on youtube vteprogramming languages comparison timeline history apl assembly basic c c c cobol fortran go groovy haskell java javascript js kotlin lisp lua objectivec pascal perl php python ruby rust shell smalltalk swift visual basic net vbnet more category lists alphabetical categorical generational nonenglishbased vtedialects of the basic programming language listclassic altair basic applesoft basic atari basic atari microsoft basic atari st basic basica basic a basic programming basic xe basic xl casio basic chipmunk basic color basic commodore basic extended color basic dartmouth basic disk extended color basic family basic gfa basic gwbasic hp basic for openvms hp timeshared basic ibm basic integer basic locomotive basic mallard basic microsoft basic msx basic pure basic rocky mountain basic sbasic tandy casio sharp pocket computers scriptbasic sinclair basic southampton basic system stos basic ti basic ti 994a tibasic calculators ti extended basic aka xbasic tiny basic turbobasic xl tymshare super basic ubasic vilnius basic xbasic procedureoriented amigabasic amos basic asic bbc basic beta basic darkbasic freebasic futurebasic gfa basic glbasic liberty basic microsoft small basic powerbasic purebasic qbasic qb64 quickbasic smallbasic superbasic thinbasic true basic turbo basic xbasic xblite basic4ppc visual test b4j with object extensions autoit basic for qt kbasic blitzmax chipmunk basic freebasic gambas glbasic monkey x openoffice basic powerbasic providex rapidq realbasic run basic visual basic visual basic net xojo for mobile devices b4x basic4android b4a basic4ppc glbasic ns basic basic4ios b4i microsoft microsoft basic mbasic ibm basicbasica gwbasic quickbasic qbasic vbscript visual basic vba visual basic net embedded visual basic vb 5 for microsoft excel 50 vsto vsta wordbasic trs80 basics level i level ii level iii microsoft small basic thirdparty vblike b4x basic for qt gambas hummingbird basic lotusscript winwrapbasic xojo commons portal authority control bnf cb11939574k data gnd 40046242 lccn sh85012076 sudoc 027330176 