Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 External
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
chrisbrown




PostPosted: Tue Dec 30, 2008 1:08 am   Post subject: External

If anyone knows, how would I incorporate a routine written in C into a Turing program? I know I need the "external" keyword, but do I need a dll extension or what?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Dec 30, 2008 2:30 am   Post subject: RE:External

According to the documentation for external, half of it is not even implemented, and it sounds like it works differently for "run" and "stand-alone" versions of the code.
Quote:
the linkage would be by means of a standard, operating system-specific linkage editor.

It sounds like if you can get your OS to link a compiled library to your binary (by means outside of Turing?), Turing could actually run those routines...

Though really, I haven't seen this done. Would be interesting if anyone could point to a working example though.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
chrisbrown




PostPosted: Tue Dec 30, 2008 1:12 pm   Post subject: RE:External

Quote:

Would be interesting if anyone could point to a working example


Take a look in Turing\Support\Predefs. Most (all?) of the .tu's make use of the external keyword, but I can't figure out how or what it's linked to.
Tony




PostPosted: Tue Dec 30, 2008 3:57 pm   Post subject: RE:External

From what I remember, all that use of external does is redefines the keyword used to call code that is already available to the Turing environment.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: