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

Username:   Password: 
 RegisterRegister   
 Array with loops help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Zasalamel




PostPosted: Sun Dec 20, 2009 10:05 pm   Post subject: Array with loops help

What is it you are trying to achieve?
I am trying to get my rpogram to draw all the lines at once


What is the problem you are having?
it will only draw one


Describe what you have tried to solve this problem
i have tried loops


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing:

View.Set ("offscreenonly")
var l : array 1 .. 64 of
    record
        x : int
        y : int
    end record
for i : 1 .. upper (l)
    l (i).x := maxx
    l (i).y := maxy
end for
for i : 1 .. upper (l)
    loop
        Draw.Dot (round (10 * cosd (l (i).x) + i * 20), round (l (i).y), black)
        l (i).x -= i
        l (i).y -= i
        View.Update
        if l (i).y < 0 then
            l (i).y := maxy
        end if
    end loop
end for

Please specify what version of Turing you are using
4.0.5
Sponsor
Sponsor
Sponsor
sponsor
Zasalamel




PostPosted: Sun Dec 20, 2009 10:15 pm   Post subject: RE:Array with loops help

Sorry topic answered by friend
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  [ 2 Posts ]
Jump to:   


Style:  
Search: