flat assembler
Message board for the users of flat assembler.
Index
> Main > Multidimensional arrays |
Author |
|
rambo 19 Apr 2005, 13:42
myarray[x][y] = myarray + (x * number_of_lines + y) * size_of_element
your example: myarray[0][2] = myarray + (0 * 10 + 2) * 2, and it`s equal to: myarray[0][2] = myarray + 4 |
|||
19 Apr 2005, 13:42 |
|
denial 19 Apr 2005, 13:49
Ah thank you, I think that was what I heard... But will it also work with more dimensions?
|
|||
19 Apr 2005, 13:49 |
|
rambo 19 Apr 2005, 13:59
int array[10][20][30][40]
array [a][b][c][d] = array + (a*20*30*40 + b*30*40 + c*40 + d) * size_of_element example: dword array[12][4][2][64] array[10][2][0][32] = array + (10*4*2*64 + 2*2*64 + 0*2*64 + 32) * 4 |
|||
19 Apr 2005, 13:59 |
|
denial 19 Apr 2005, 15:58
thank you really much :O)
|
|||
19 Apr 2005, 15:58 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.