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

Username:   Password: 
 RegisterRegister   
 2d arrays
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ak




PostPosted: Fri Apr 25, 2003 2:38 pm   Post subject: 2d arrays

How do u use 2d arrays? I tried 2 look all over the internet but couldn't find any sites explaining it.
Also, if how would I move a box back and forth on the screen and speed uo the process.
code:

var x:= 20
drawbox (20, 20,510, 390, 9)
randomize
randint (x, 0, 400)
for decreasing y: 300 .. 25

drawbox (x, y, x+ 20, y + 20, 2)
delay (20)
drawbox (x, y, x+ 20, y + 20, 0)
end for


thanks
Wink
Sponsor
Sponsor
Sponsor
sponsor
Blade




PostPosted: Fri Apr 25, 2003 3:40 pm   Post subject: (No subject)

http://www.compsci.ca/bbs/viewtopic.php?t=366

this tutorial explains everything on arrays... but if you mean initializing 2d arrays, then..

code:
var names:array 1..2, 1..2 of string:=init("john", "thomas","henry","ford")
put names(1,1)," ",names(1,2)

and you would would see john thomas on the screen..

less delay time to speed up the process
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: