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

Username:   Password: 
 RegisterRegister   
 Duplicating procedures & redrawing it x amount of times
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
xHoly-Divinity




PostPosted: Thu Dec 02, 2004 5:41 pm   Post subject: Duplicating procedures & redrawing it x amount of times

code:

proc a (x, y : int)
    drawfilloval (100 + x, 100 + y, 10, 10, black)
end a
var b : int
get b


What I am trying to do is when the user inputs b, run procedure 'a' 'b' amount of times at a different location (x+10). Is this at all possible, and if it is please send an example.
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Thu Dec 02, 2004 6:14 pm   Post subject: (No subject)

code:

var b : int
get b
proc a (x, y : int)
    drawfilloval (100 + x, 100 + y, 10, 10, black)
end a
for i : 1 .. b * 10 by 10
    a (10 + i, 20 + i)
end for

Somehing like that?
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: