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

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




PostPosted: Tue May 02, 2006 5:13 pm   Post subject: Sql style variables

How do I do...
code:

get name as result
for name="hi" message="foo"
for name="hi" message="bar"
else for name message="noo"

So that I can have more than one name each with a message assigned to them[/code]
Sponsor
Sponsor
Sponsor
sponsor
HellblazerX




PostPosted: Tue May 02, 2006 5:26 pm   Post subject: (No subject)

I suggest that you store those names and messages into separate arrays, and you can call on them in order. There's a nice array tutorial made by Tony that can be found here.
Junkhead




PostPosted: Tue May 02, 2006 6:11 pm   Post subject: (No subject)

Yeah, arrays are a must to know if youre doing serious programming in Turing.
MysticVegeta




PostPosted: Tue May 02, 2006 6:12 pm   Post subject: (No subject)

in any language actually
Junkhead




PostPosted: Tue May 02, 2006 6:15 pm   Post subject: (No subject)

Actually, that's very true.
wtd




PostPosted: Tue May 02, 2006 6:46 pm   Post subject: (No subject)

Well, in a fair number of them you can get away with mostly using lists and tuples.
Clayton




PostPosted: Tue May 02, 2006 8:45 pm   Post subject: (No subject)

you could also make a record to store the information you want, check out the Turing Tutorials on records to get an idea on them if you dont already know how to use them
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  [ 7 Posts ]
Jump to:   


Style:  
Search: