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

Username:   Password: 
 RegisterRegister   
 how do you make your own commands?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Shyfire




PostPosted: Wed Jun 29, 2005 9:36 pm   Post subject: how do you make your own commands?

could someone explane how those ppl are making there own turing commands !!!!!!!!
and show me how to do it to
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Wed Jun 29, 2005 11:00 pm   Post subject: (No subject)

I believe what you're referring to is people making modules/classes. This does not mean that they are editting the Turing language in anyway.

Turing:

procedure sayHello
   put "Hello World"
end sayHello


This is a 'command' of my own making. I put this in my file, then I type 'sayHello' and bang!

Turing:

procedure sayHello (name : string)
   put "Hello ", name
end sayHello


Another of my own 'commands'. This time, you can choose what name it's going to say hello to.

Look up the tutorials on Modules, and Classes. You'll see examples where one has made a series of linked 'commands' (Modules) or linked behaviours of a specified object (Classes).
[Gandalf]




PostPosted: Thu Jun 30, 2005 1:23 am   Post subject: (No subject)

Delos wrote:
This does not mean that they are editting the Turing language in anyway.

On the contrary, we can easily change the parameters for some command already in Turing, often programmed in C++. There are also some commands programmed in Turing. In that case we can edit the language directly, changing commands that are already there.

I believe you were talking about making completely new modules.

If you want to make work with Turing, adding to it and changing it the yes, look into how modules and classes work, mostly modules though.
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  [ 3 Posts ]
Jump to:   


Style:  
Search: