Friday, October 5, 2012

That's BASIC.


Unstructured Programming Language: BASIC
  • Introduction
      BASIC is the basis of several programming languages today. There are several easy to learn functions, and the syntax is also very simple. There’s no needed “;” at the end of each line which just makes it a bit easier and nicer to use. 

    It’s a great starting programming language and is one of the easiest programming languages to learn and use. It’s a great predecessor to more complicated programming languages and it’s free. I would recommend trying it out.
  • The Language

Beginner's All-purpose Symbolic Instruction Code or BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use. It originated from Dartmouth BASIC, designed in 1964 by John George Kemeny and Thomas Eugene Kurtz at Dartmouth College in New HampshireUSA to provide computer access to non-science students. At the time, nearly all use of computers required writing custom software, which was something only scientists and mathematicians tended to do. 

John G. Kemeny (left) and Thomas E. Kurtz

The language and its variants became widespread on microcomputers in the late 1970s and 1980s, when it was typically a standard feature, and often part of the firmware of the machine. The presence of an easy-to-learn language such as BASIC on these early personal computers allowed small business owners to develop their own custom application software, leading to widespread use of these computers in businesses that previously did not have access to computing technology.

  • History


The original BASIC language was implemented by a team of Dartmouth students under their direction. The acronym is tied to the name of an unpublished paper by Thomas Kurtz and is not a backronym. BASIC was designed to allow students to write programs for the Dartmouth Time-Sharing System. It was intended specifically for the new class of users that time-sharing systems allowed—that is, a less technical user who did not have the mathematical background of the more traditional users and was not interested in acquiring it. Being able to use a computer to support teaching and research was quite novel at the time.

The language was based on FORTRAN II, with some influences from ALGOL 60 and with additions to make it suitable for timesharing. Initially, BASIC concentrated on supporting straightforward mathematical work, with matrix arithmetic support from its initial implementation as a batch language and full string functionality being added by 1965.

The designers of the language decided to make the compiler available free of charge so that the language would become widespread. They also made it available to high schools in the Hanover area and put a considerable amount of effort into promoting the language. In the following years, as other dialects of BASIC appeared, Kemeny and Kurtz's original BASIC dialect became known as Dartmouth BASIC.

  • Dialects

BASIC remains popular in numerous dialects and new languages influenced by BASIC such as Microsoft Visual Basic. In 2006, 59% of developers for the .NET Framework used Visual Basic .NET as their only programming language.


Many BASIC dialects have also sprung up in the last few years, including the open source Bywater BASIC, Gambas and FreeBASIC - and the commercial PureBasic, Power BASIC, RealBasic, and True BASIC (the direct successor to Dartmouth BASIC from a company controlled by Kurtz).
Several web-based simple BASIC interpreters also now exist, including Quite BASIC and Microsoft's Small Basic.
Versions of BASIC have been showing up for use on Smart Phones and Tablets. One version is RFO BASIC for Android devices. Another Android BASIC is Mintoris Basic. There is also a version for Apple smart phones and tablets called Basic!


  •  Syntax
    • Keywords
Data manipulation
      • LET: assigns a value (which may be the result of an expression) to a variable.
      • DATA: holds a list of values which are assigned sequentially using the READ command.
Program flow control
      • IF ... THEN ... ELSE: used to perform comparisons or make decisions.
      • FOR ... TO ... {STEP} ... NEXT: repeat 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 ... UNTIL: repeat 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 {UNTIL}: repeat a section of code Forever or While/Until the specified condition is true . The condition may be evaluated before each iteration of the loop, or after.
      • GOTO: jumps to a numbered or labelled line in the program.
      • GOSUB: temporarily jumps to a numbered or labelled line, returning to the following line after encountering the RETURN Command. This is used to implement subroutines.
      • ON ... GOTO/GOSUB: chooses where to jump based on the specified conditions. 
Input and output
      • PRINT: displays a message on the screen or other output device.
      • INPUT: asks 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.
Miscellaneous
      • REM: holds a programmer's comment or REMark; often used to give a title to the program and to help identify the purpose of a given section of code.
    • Data types and variables
      • Minimal versions of BASIC had only integer variables and one-letter variable names. More powerful versions had floating-point arithmetic, and variables could be labelled with names six or more characters long.
      • String variables are usually distinguished in many microcomputer dialects by having $ suffixed to their name, and string values are typically enclosed in 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 support matrix operations such as assignment, addition, multiplication (of compatible matrix types), and evaluation of a determinant. Microcomputer dialects often lacked this data type and required a programmer to provide subroutines to carry out equvalent operations.

  • Sample Run
          10 PRINT "HELLO WORLD!"



  • Comments
    • "It's so basic." (Rivera, Mark Harold C., ICS, UPLB, 2012)
    • "That's basic." (Vega Kevin G., 2012)


  • Submitted by
    • Kevin G. Vega
    • 2010-57556
    • "Kevzo8"
    • T-2L


2 comments:

  1. Good day,
    how are you doing?
    can you help me sell BASIC PROGRAMMING TEXTBOOK?
    kunlesky2@gmail.com

    ReplyDelete
  2. Very informative article which is about the 10 x 10 trade show booth and i must bookmark it, keep posting interesting articles.
    10 x 10 trade show booth

    ReplyDelete