View Single Post
Old 12-25-2011, 01:35 AM   #18
Zoab
Human being with feelings
 
Join Date: Dec 2011
Posts: 3
Default

I've been struggling with arrays, and though I managed to figure out my problem. I find this thread very strange:

Quote:
Originally Posted by IXix View Post
Looks to me like your offsets are, well, off. The start offset of each 'array' should be the base address of previous 'array' plus it's size...

Code:
memtest1 = 0;
memtest2 = memtest1 + 3;
memtest3 = memtest2 + 6;
Does that do what you're expecting?

edit: DarkStar types faster than I do
It seems to me that by coding:
Code:
memtest = 0;
memtest2 = memtest1+3;
etc...
you are suggesting that memtest1 will start from memory 0, and memtest2 will start from memory memtest1+3 = (in this case) 3.
However, as far as I understand you are just storing the number 0 in memtest1 and then storing the number 0+3 = 4 in memtest2.

Am I wrong or are you actually defining an array in memory?

Confused,
Zoab

Edit: I've added an image to show my confusion.
Attached Images
File Type: jpg Capture2.jpg (7.2 KB, 296 views)

Last edited by Zoab; 12-25-2011 at 01:46 AM. Reason: I've added an image that explains my confusion :)
Zoab is offline   Reply With Quote