Turing is a programming language created in 1982 by Ric Holt.

#536on PLDB | 42Years Old | 524Repos |

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. Read more on Wikipedia...

- Tags: programming language
- There are at least 524 Turing repos on GitHub
- The Google BigQuery Public Dataset GitHub snapshot shows 153 users using Turing in 167 repos on GitHub
- Explore Turing snippets on Rosetta Code
- Turing on HOPL
- GitHub supports syntax highlighting for Turing
- See also: (5 related languages) Euclid, Pascal, SP/k, MIPS architecture, TXL

Example from the web:

```
% 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)
```

Example from hello-world:

```
put "Hello World"
```

Example from Linguist:

```
% 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)
```

Example from Wikipedia:

```
% 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)
```

Feature | Supported | Example | Token |
---|---|---|---|

Strings | âœ“ | "Hello world" | " |

Print() Debugging | âœ“ | put | |

Comments | âœ“ | % A comment | |

Line Comments | âœ“ | % A comment | % |

Semantic Indentation | X |