
-----------------------------------
Artermis
Thu Sep 09, 2004 3:09 pm

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:

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!

-----------------------------------
Andy
Thu Sep 09, 2004 3:12 pm


-----------------------------------
what u need to do i is have a string/array to hold the words  for your abc example, just have this


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
Thu Sep 09, 2004 3:32 pm


-----------------------------------
thanks a lot dodge! is an array difficult to generate?

-----------------------------------
Delos
Thu Sep 09, 2004 3:45 pm


-----------------------------------
Here's a useful list for you!

[url=http://www.compsci.ca/v2/viewtopic.php?t=1117]Arrays by Dodge
[url=http://www.compsci.ca/v2/viewtopic.php?t=366]Arrays by Tony
[url=http://www.compsci.ca/v2/viewtopic.php?t=2325]Records by Dodge
[url=http://www.compsci.ca/v2/viewtopic.php?t=407]Procs, Fcns, Processes by Tony
[url=http://www.compsci.ca/v2/viewtopic.php?t=367]Iffs by Tony


Many many more available in the Tutorial's section.

-----------------------------------
Andy
Thu Sep 09, 2004 6:01 pm


-----------------------------------
dammit... i need to get powers in turing section so i can delete tony's array tutorial... mine is soooo much better :p
