Turing (programming language)

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
Turing
File:Turing logo.gif
Paradigm multi-paradigm: object-oriented, procedural
Designed by Ric Holt and James Cordy
Developer Holt Software Associates
First appeared 1982
Typing discipline static, manifest
OS Microsoft Windows
Website {{#property:P856}}
Major implementations
Turing, TPlus, OpenT
Dialects
Object-Oriented Turing, Turing Plus
Influenced by
Euclid, Pascal, SP/k

Turing is a Pascal-like programming language developed in 1982 by Ric Holt and James Cordy, then of University of Toronto, Canada. Turing is a descendant of Euclid, Pascal and SP/k that features a clean syntax and precise machine-independent semantics.

Turing 4.1.0 is the latest stable version of Turing. Turing 4.1.1 and Turing 4.1.2 do not allow for stand alone .EXE files to be created and versions before Turing 4.1.0 have outdated syntax and outdated functions.

Overview

Named after British computer scientist Alan Turing, Turing is used primarily as a teaching language at the high school and university level.[citation needed] Two other versions exist, Object-Oriented Turing and Turing Plus, a systems programming variant. In September 2001, "Object Oriented Turing" was renamed "Turing" and the original Turing was renamed "Classic Turing". Turing is no longer supported by Holt Software Associates in Toronto. Currently, Microsoft Windows is the only supported platform. Turing is widely used in high schools in Ontario as an introduction to programming.[citation needed]

On November 28, 2007, Turing, which was previously a commercial programming language, became freeware, available to download from the developer's website free of charge for personal, commercial, and educational use.[1][2][3]

The makers of Turing, Holt Software Associates, have since ceased operations. It is unclear whether Turing is still in development, but there have been no new releases since November 25, 2007.[2]

Syntax

Turing is designed to have a very lightweight, readable, intuitive syntax. Here is the entire Hello World! program in Turing with syntax highlighting:

put "Hello World!"

Turing avoids semicolons and braces, using explicit end markers for most language constructs instead, and allows declarations anywhere. Here is a complete program defining and using the traditional recursive function to calculate a factorial.

 % Accepts a number and calculates its factorial
 
 function factorial (n: int) : real
      if n = 0 then
           result 1
      else
           result n * factorial (n - 1)
      end if
 end factorial
 
 var n: int
 loop
      put "Please input an integer: " ..
      get n
      exit when n >= 0
      put "Input must be a non-negative integer."
 end loop
 
 put "The factorial of ", n, " is ", factorial (n)

Open implementations

Currently, there are two open source alternative implementations of Turing: Open Turing, an open source version of the original interpreter, and TPlus, a native compiler for the concurrent systems programming language variant Turing Plus. OpenT, a project to develop a compiler for Turing, is no longer in development.

Open Turing

Open Turing is an open-source implementation of the original Turing interpreter for Windows written by Holt Software. It includes speed improvements, new features such as OpenGL 3D and a new code editor. It is fully backwards compatible with the closed-source implementation.[4]

TPlus

TPlus is an open-source implementation of original (non-Object-Oriented) Turing with systems programming extensions developed at the University of Toronto and ported to Linux, Solaris and Mac OS X at Queen's University in the late 1990s. TPlus implements Turing+ (Turing Plus), a concurrent systems programming language based on the original Turing programming language. Some, but not all, of the features of Turing Plus were eventually subsumed into the present Object-Oriented Turing language. Turing Plus extends original Turing with processes and monitors (as specified by C.A.R. Hoare) as well as language constructs needed for systems programming such as binary input-output, separate compilation, variables at absolute addresses, type converters and other features.

OpenT

OpenT is an abandoned open-source language, compiler, and IDE that was being developed by the members of the dTeam of Computer Science Canada.[citation needed] It shares many similarities with Turing, and is fully backwards compatible with it.

Trivia

As an addition to the usual graphics drawing functions, Turing features special functions for drawing maple leaves to allow easier drawing of the Canadian flag.[5]

See also

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. 2.0 2.1 Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. Lua error in package.lua at line 80: module 'strict' not found.

Further reading

  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.

External links

This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.