View Single Post
Old 12-26-2011, 02:18 AM   #20
Mich
Human being with feelings
 
Join Date: May 2009
Posts: 1,265
Default

Quote:
Originally Posted by Zoab View Post
Am I wrong or are you actually defining an array in memory?
You don't define arrays in JS. There are no arrays in JS. Search the documentation no single mention of array in their.
What you have is 8M memory slots per effect and a[b] accesses the memory slot with offset a+b. Simple as that.

So in case a=0; b=3; a[0]=1; b[0]=2; a[1]=3; b[3]; you'd get your effects memory slots like: {1, 3, 0, 2, 0, 0, 6, ...}
Then doing 0[0] == 1; 0[1] == 3; 0[3] == 2; or even 2[3] == 6; will all evaluate to true.

EDIT: Just to reiterate you don't define arrays in JS. The memory region you access is just there from the very beginning and you just use it.
__________________
Quote:
Originally Posted by vBulletin Message
Sorry pipelineaudio is a moderator/admin and you are not allowed to ignore him or her.
Mich is offline   Reply With Quote