| QUOTE (Kthulu @ Nov 13 2003, 03:16 AM) |
| ;here's a 2x2 array of 4-digit numbers... SET myArray "1025367852148526" you might be wondering how much crack i've been smoking cause that just looks like a string of numbers. well, it is. but check this out... ;get value stored in myArray(0,0) and store it in myValue1... SETFUNC myValue1 MID 0 4 %myArray% ;get value stored in myArray(0,1) and store in myValue2 SETFUNC myValue2 MID 4 4 %myArray% ;get value stored in myArray(1,0)... SETFUNC myValue3 MID 8 4 %myArray% ^ ;notice how these nums^ are progressing... this is basically what a high-level language does for you when you say 'myValue = myArray(1,1). when computers store arrays in memory, it's a linear and contiguous set of values. what makes it an array is how you access it. most high-level languages encapsulate this process. so, if you find yourself wishing you could create an array, you can! |