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

Username:   Password: 
 RegisterRegister   
 Help with co-ords...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
1337_brad




PostPosted: Sat Nov 27, 2004 12:26 am   Post subject: Help with co-ords...

I need to have something to remember co-ords,

I had this code

code:

    for i : 1 .. 500
         for j : 1 .. 500
            if itematx(i)= 1 and itematy(j)= 1 then
                Pic.Draw (pillow1, i, j, picMerge)

             end if
        end for
     end for
    View.Update
 end if



But that gave me alot of problems due to if I use arrays, the properties are true for more than one co-ord... but anyway... HELP! :p
Sponsor
Sponsor
Sponsor
sponsor
SuperGenius




PostPosted: Sat Nov 27, 2004 1:01 am   Post subject: (No subject)

It is difficult to understand this fragment of code. If you post the rest or at least explain what your arrays are supposed to be holding then it will be less confusing for someone trying to help.
wtd




PostPosted: Sat Nov 27, 2004 1:03 am   Post subject: Re: Help with co-ords...

1337_brad wrote:
I need to have something to remember co-ords,

I had this code

code:

    for i : 1 .. 500
         for j : 1 .. 500
            if itematx(i)= 1 and itematy(j)= 1 then
                Pic.Draw (pillow1, i, j, picMerge)

             end if
        end for
     end for
    View.Update
 end if



But that gave me alot of problems due to if I use arrays, the properties are true for more than one co-ord... but anyway... HELP! :p


Sounds like you need a multi-dimensional array. That would create a grid of values.

code:
var myArray : array 1 .. 500, 1 .. 500 of int


Something like that.
Martin




PostPosted: Sat Nov 27, 2004 2:52 am   Post subject: (No subject)

An array of arrays, if you will.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: