| Turing Programming Language |
Article Index for Turing |
Shopping Turing |
Website Links For Turing |
Information AboutTuring Programming Language |
| CATEGORIES ABOUT TURING PROGRAMMING LANGUAGE | |
| articles with example code | |
| programming languages | |
| educational programming languages | |
| structured programming languages | |
| algol programming language family | |
|
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 . Versions for Unix , Microsoft Windows and Apple Macintosh are available. HOW TO GET TURING Most highschools - in Ontario, Canada - that offer some type of programming course would have a license. However, you may purchase your own license. SYNTAX Here is a sample Hello World program in Turing: put "Hello World!" VARIABLES In order to create a variable, you must declare and define it. Declaration:
Defining: variable := "" Or you can declare and define all at once: var variable := "" CODE SAMPLES A brief example of Turing is the following 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
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) or % Accepts the user's name and gender and outputs a greeting var name, gender : string put "Enter your last name: " get name cls put "Are you Male(m) or Female(f)?" get gender cls if gender = "m" then put "Hello Mr. ", name, ", how are you?" else put "Hello Ms. ", name, ", how are you?" end if EXTERNAL LINKS SEE ALSO |
|
|