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

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




PostPosted: Thu Sep 09, 2004 3:09 pm   Post subject: Time Delay - strings

Hi! I am a beginner at comp sci in my first year and I am ever so loving Turing. I'm interested in how to incorporate a time delay in things... let me explain. I found this neat code in the help:

code:
for i : 1 .. 10
            put i
            delay (1000)    % Pause for 1 second
        end for


that goes
1
2
3
with one second in between them.

How would I be able to make it go
a
b
c
with one second in between? I have tried fiddling with it and editing it, but like I said I know very little but the bare basics.

Eventually I'd also like to input strings:
one
two
three
with one second, or 2 seconds in between.

If you anyone could help, thanks a lot!
Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: Thu Sep 09, 2004 3:12 pm   Post subject: (No subject)

what u need to do i is have a string/array to hold the words for your abc example, just have this

code:

var letters:="abcdefghijklmnopqrstuvwxyz"
for i : 1 .. 26
    put letters(i)
    delay (1000)
end for


as for ur one two three example, u'd have to use an array to hold the words
Artermis




PostPosted: Thu Sep 09, 2004 3:32 pm   Post subject: (No subject)

thanks a lot dodge! is an array difficult to generate?
Delos




PostPosted: Thu Sep 09, 2004 3:45 pm   Post subject: (No subject)

Here's a useful list for you!

Arrays by Dodge
Arrays by Tony
Records by Dodge
Procs, Fcns, Processes by Tony
Iffs by Tony


Many many more available in the Tutorial's section.
Andy




PostPosted: Thu Sep 09, 2004 6:01 pm   Post subject: (No subject)

dammit... i need to get powers in turing section so i can delete tony's array tutorial... mine is soooo much better :p
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  [ 5 Posts ]
Jump to:   


Style:  
Search: