# Turing (programming language)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Turing_(programming_language)
> Markdown URL: https://mediated.wiki/source/Turing_(programming_language).md
> Source: https://en.wikipedia.org/wiki/Turing_(programming_language)
> Source revision: 1346821143
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

High-level computer programming language

This article needs to be updated. Please help update this article to reflect recent events or newly available information. (December 2021)

Turing Paradigm multi-paradigm: procedural, object-oriented Designed by Ric Holt, James Cordy Developer Holt Software Associates First appeared 1982; 44 years ago (1982) Final release 4.1.1 / November 25, 2007; 18 years ago (2007-11-25) Typing discipline static, manifest OS Microsoft Windows Major implementations Turing, TPlus, OpenT Dialects Object-Oriented Turing, Turing+ Influenced by Euclid, Pascal, SP/k

**Turing** is a [high-level](/source/High-level_programming_language), [general purpose](/source/General-purpose_programming_language) [programming language](/source/Programming_language) developed in 1982 by [Ric Holt](/source/Ric_Holt) and [James Cordy](/source/James_Cordy), at [University of Toronto](/source/University_of_Toronto) in Ontario, Canada. It was designed to help students taking their first [computer science](/source/Computer_science) course learn how to code. Turing is a descendant of [Pascal](/source/Pascal_(programming_language)), [Euclid](/source/Euclid_(programming_language)), and [SP/k](/source/SP%2Fk) that features a clean [syntax](/source/Syntax_(programming_languages)) and precise machine-independent [semantics](/source/Semantics_(programming_languages)).

Turing 4.1.0 is the latest stable version. Versions 4.1.1 and 4.1.2 do not emit [standalone program](/source/Standalone_program) [.exe](/source/.exe) files. Versions pre-4.1.0 have outdated syntax and functions.

## Overview

Named after British computer scientist [Alan Turing](/source/Alan_Turing), Turing is used mainly as a teaching language at the high school and university level.[1] Two other versions exist, [Object-Oriented Turing](#Object-Oriented_Turing) and [Turing+](#Turing+), a systems programming variant. In September 2001, "Object Oriented Turing" was renamed "Turing" and the original Turing was renamed "Classic Turing". Turing is now unsupported by Holt Software Associates in [Toronto, Ontario](/source/Toronto%2C_Ontario). Turing was widely used in high schools in [Ontario](/source/Ontario) as an introduction to programming.[2]

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.[3][4][5]

The makers of Turing, Holt Software Associates, have since ceased operations, and Turing has seen no further development since November 25, 2007.[4]

## Syntax

Turing is designed to have a very lightweight, readable, intuitive [syntax](/source/Syntax_(programming_languages)). Here is the entire ["Hello, World!" program](/source/%22Hello%2C_World!%22_program) in Turing with [syntax highlighting](/source/Syntax_highlighting):

**put** "Hello World!"

Turing avoids [semicolons](/source/Semicolon) and [braces](/source/Curly_brackets), using explicit end markers for most language constructs instead, and allows [declarations](/source/Declaration_(computer_programming)) anywhere. Here is a complete program defining and using the traditional [recursive](/source/Recursion) function to calculate a [factorial](/source/Factorial).

 [%](/source/Comment_(computer_programming)) 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](/source/Interpreter_(computing)), and [TPlus](#TPlus), a native compiler for the concurrent system programming language variant [Turing+](#Turing+). [OpenT](#OpenT), a project to develop a Turing compiler, was discontinued.

### Open Turing

Open Turing is an open-source implementation of the original Turing interpreter for Windows written by Tristan Hume. 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.[6]

### 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](/source/Linux), [Solaris](/source/Oracle_Solaris), and [Mac OS X](/source/MacOS) at [Queen's University](/source/Queen's_University_at_Kingston) in the late 1990s.[7] TPlus implements [Turing+](#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](#Object-Oriented_Turing) language. Turing Plus extends original Turing with [processes](/source/Process_(computing)), [monitors](/source/Monitor_(synchronization)) (as specified by [C.A.R. Hoare](/source/C.A.R._Hoare)), and language constructs needed for system programming such as binary input-output, separate compiling, variables at absolute addresses, type converters and other features.

## Turing+

Turing+ Paradigm multi-paradigm: procedural, object-oriented, concurrent Designed by Ric Holt, James Cordy Developer Ric Holt, James Cordy First appeared 1987; 39 years ago (1987) Typing discipline static, manifest Influenced by Concurrent Euclid, Turing Influenced Object-Oriented Turing

**Turing+** (Turing Plus) is a [concurrent systems](/source/Concurrent_system) programming language based on the Turing programming language designed by [James Cordy](/source/James_Cordy) and [Ric Holt](/source/Ric_Holt), then at the [University of Toronto](/source/University_of_Toronto), Canada, in 1987. Some, but not all, of the features of Turing+ were eventually subsumed into [Object-Oriented Turing](#Object-Oriented_Turing). Turing+ extended original Turing with processes and [monitors](/source/Monitor_(synchronization)) (as specified by [C.A.R. Hoare](/source/C.A.R._Hoare)) as well as language constructs needed for systems programming such as binary input-output, separate compiling, variables at absolute addresses, type converters, and other features.

Turing+ was explicitly designed to replace [Concurrent Euclid](/source/Concurrent_Euclid) in systems-programming applications. The [TUNIS](/source/TUNIS) operating system, originally written in Concurrent Euclid, was recoded to Turing+ in its [MiniTunis](https://en.wikipedia.org/w/index.php?title=MiniTunis&action=edit&redlink=1) implementation. Turing+ has been used to implement several production software systems, including the language [TXL](/source/TXL_(programming_language)).

## Object-Oriented Turing

Object-Oriented Turing Paradigm multi-paradigm: procedural, object-oriented, concurrent Designed by Ric Holt Developer Ric Holt First appeared 1991; 35 years ago (1991) Typing discipline static, manifest OS Cross-platform: Sun-4, MIPS, RS-6000 Influenced by Turing

**Object-Oriented Turing** is an extension of the Turing programming language and a replacement for [Turing Plus](#Turing_Plus) created by [Ric Holt](/source/Ric_Holt)[8][9] of the [University of Toronto](/source/University_of_Toronto), Canada, in 1991. It is [imperative](/source/Imperative_programming), [object-oriented](/source/Object-oriented_programming), and [concurrent](/source/Concurrency_(computer_science)). It has [modules](/source/Modularity_(programming)), [classes](/source/Class_(programming)), single [inheritance](/source/Inheritance_(object-oriented_programming)), [processes](/source/Process_(computing)), [exception handling](/source/Exception_handling), and optional [machine-dependent](/source/Machine-dependent) programming.

There is an [integrated development environment](/source/Integrated_development_environment) under the [X Window System](/source/X_Window_System) and a demo version.[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*] Versions exist for [Sun-4](/source/Sun-4), [MIPS](/source/MIPS_architecture), [RS-6000](/source/IBM_System_p), [NeXTSTEP](/source/NeXTSTEP), [Windows 95](/source/Windows_95), and others.

## References

1. **[^](#cite_ref-1)** Fluck, A.; Webb, M.; Cox, M.; Angeli, C.; Malyn-Smith, J.; Voogt, J.; Zagami, J. (2016). "Arguing for computer science in the school curriculum". *Journal of Educational Technology & Society*. **19** (3): 38–46.

1. **[^](#cite_ref-2)** info@compsci.ca. ["Download Turing & RTP (Ready to Program)"](http://compsci.ca/holtsoft/). *compsci.ca*. Retrieved 2018-08-21.

1. **[^](#cite_ref-holtsoft_3-0)** ["Holt Software Associates"](https://web.archive.org/web/20100405101149/http://www.holtsoft.com/). January 2008. Archived from [the original](http://www.holtsoft.com) on 2010-04-05. Retrieved 2010-04-10.

1. ^ [***a***](#cite_ref-holtsoft/old_index_4-0) [***b***](#cite_ref-holtsoft/old_index_4-1) ["Holt Software Associates (old)"](https://web.archive.org/web/20100417185823/http://www.holtsoft.com/old_index.html). 2007-11-25. Archived from [the original](http://www.holtsoft.com/old_index.html) on 2010-04-17. Retrieved 2010-04-10.

1. **[^](#cite_ref-5)** ["Download Turing 4.1.1"](http://compsci.ca/blog/download-turing-411/). compsci.ca Blog. 2007-11-28. Retrieved 2009-01-10.

1. **[^](#cite_ref-6)** Hume, Tristan. ["Open Turing"](https://tristan.hume.ca/openturing/). Retrieved 6 May 2012.

1. **[^](#cite_ref-7)** Cordy, James. ["Turing+ 6.1"](https://txl.ca/txl-tplusdownload.html). Retrieved 11 December 2020.

1. **[^](#cite_ref-8)** Mancoridis, Spiros; Holt, Richard C.; Penny, David A. (1993). ["A conceptual framework for software development"](https://doi.org/10.1145/170791.170806). *Proceedings of the 1993 ACM conference on Computer science - CSC '93*. pp. 74–80. [doi](/source/Doi_(identifier)):[10.1145/170791.170806](https://doi.org/10.1145%2F170791.170806). [ISBN](/source/ISBN_(identifier)) [0-89791-558-5](https://en.wikipedia.org/wiki/Special:BookSources/0-89791-558-5).

1. **[^](#cite_ref-9)** [Holt, RC](/source/Ric_Holt) (1992). *Turing reference manual* (3rd. ed.). [Toronto](/source/Toronto): Holt Software Associates. [ISBN](/source/ISBN_(identifier)) [978-0-921598-15-2](https://en.wikipedia.org/wiki/Special:BookSources/978-0-921598-15-2). [OCLC](/source/OCLC_(identifier)) [71476276](https://search.worldcat.org/oclc/71476276).

## Further reading

- Grogono, Peter (1995). [*Programming with Turing and Object Oriented Turing*](https://www.springer.com/gp/book/9780387945170). Springer-Verlag. [ISBN](/source/ISBN_(identifier)) [978-0-387-94517-0](https://en.wikipedia.org/wiki/Special:BookSources/978-0-387-94517-0).

- [Holt, Richard C.](/source/Ric_Holt); [Cordy, James R.](/source/James_Cordy) (December 1983). "The Turing language report". *Annual Progress Report*. Canada: Computer Systems Research Institute, [University of Toronto](/source/University_of_Toronto). [ISSN](/source/ISSN_(identifier)) [0316-6295](https://search.worldcat.org/issn/0316-6295).

- [Holt, Richard C.](/source/Ric_Holt); [Cordy, James R.](/source/James_Cordy) (December 1988). ["The Turing programming language"](https://doi.org/10.1145%2F53580.53581). *[Communications of the ACM](/source/Communications_of_the_ACM)*. **31** (12): 1410–1423. [doi](/source/Doi_(identifier)):[10.1145/53580.53581](https://doi.org/10.1145%2F53580.53581). [S2CID](/source/S2CID_(identifier)) [40859457](https://api.semanticscholar.org/CorpusID:40859457).

- [Holt, Richard C.](/source/Ric_Holt); Matthews, Philip A.; Rosselet, J. Alan; [Cordy, James R.](/source/James_Cordy) (1988). *The Turing programming language: design and definition*. [Englewood Cliffs, N.J.](/source/Englewood_Cliffs%2C_New_Jersey): [Prentice Hall](/source/Prentice_Hall). [ISBN](/source/ISBN_(identifier)) [978-0-13-933136-7](https://en.wikipedia.org/wiki/Special:BookSources/978-0-13-933136-7). [OCLC](/source/OCLC_(identifier)) [17377539](https://search.worldcat.org/oclc/17377539).

## External links

Wikibooks has a book on the topic of: ***[Turing](https://en.wikibooks.org/wiki/Turing)***

- [OpenTuring](https://github.com/Open-Turing-Project/OpenTuring) on [GitHub](/source/GitHub)

Authority control databases International GND FAST National United States France BnF data Czech Republic Israel Other IdRef

---
Adapted from the Wikipedia article [Turing (programming language)](https://en.wikipedia.org/wiki/Turing_(programming_language)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Turing_(programming_language)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
