
-----------------------------------
Prince
Wed Apr 09, 2003 10:21 pm

turing to other code
-----------------------------------
can u directly translate turing code into another programming language like c++ or directx/opengl

-----------------------------------
Asok
Wed Apr 09, 2003 10:24 pm


-----------------------------------
no, different syntax

ie.

Turing
var i : int

C++

int i;

-----------------------------------
Prince
Wed Apr 09, 2003 10:25 pm


-----------------------------------
well wat about putting the turing code into another language's compiler and having the compiler translate for u? can u do that?

-----------------------------------
Tony
Wed Apr 09, 2003 10:26 pm


-----------------------------------
well the way turing compiler is structured, is it actually translated turing into C++ first, and compiles that.

but you'd need to write your own translation program. If anyone is willing on starting the project, the rest of us will help. Having a turing to C++ translator would be very very nice. For multiple reasons.

-----------------------------------
Asok
Wed Apr 09, 2003 11:53 pm


-----------------------------------
tony, that project is a lot harder than it sounds, you need to literally automate includes, structures, functions, headerfiles, classes, external libraries, etc.

we would essentially be creating our own programming language with syntax identical to turing.

-----------------------------------
Tony
Thu Apr 10, 2003 7:49 am


-----------------------------------
yes, basically... but if we do it the same way as turing does it, we just include ALL of include files. As for functions and stuff... they're already in the right place, we just need to change the syntax :wink:

-----------------------------------
Martin
Sat Apr 12, 2003 11:52 am


-----------------------------------
It may sound easy, but the structure is a lot different.
For example, to read your name and put it to the screen in turing is


var name : string
get name
put name


in c++


#include 

int main()
{
      char name[255];
      cin.getline (name, 255);
      cout 