Hmmm...not sure...have you tried anything in an attempt to implement one? <p>-Robherc<br><a href=mailto:robherc@netzero.net>robherc@netzero.net</a><br><a href= > </a><br>*nix installation & program collector/reseller. Contact me if you think you've got one that I don't
Following Horrid:<br>
Javascript's matJ = new Array(new Array(), new Array()) acts similar to VB's dim matV(2,dim2) but is more flexible in that the Javascript's matJ "rows" need not have the same length. Get the entry in the second row, third column of matJ by var x = matJ[1][2] (unfortunately, indexing starts at 0). In the following code<br>
<br>
<script language="JavaScript"><br>
matJ = new Array(new Array(1,2,3,4,5), new Array(11,12,13,14,15,16))<br>
var x = matJ[1][2]<br>
alert('x is ' + x)<br>
</script><br>
<br>
the alert reports "x is 13"<br>
you could also set up a for loop:<br>
<br>
theArray = new Array(99);<br>
for (i=0; i<theArray.length; i++){<br>
theArray<i>=new Array();}<br>
<br>
then refrence like:<br>
theArray[x][x]<br>
<br>
once again, you could do a 3-d array in a simmilar way:<br>
<br>
theArray = new Array(99);<br>
<br>
for (i=0; i<theArray.length; i++){<br>
theArray<i>=new Array(99);<br>
for (j=0; j<theArray<i>.length; i++){<br>
theArray<i>[j]=new Array(99);}}<br>
<br>
--not sure if the 3-d thing works, but if so, then you can have 2,000-d arrays!!!--(but why would you want that???) <p>theEclipse<br><a href=mailto: > </a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>
I already figured it out and I do use a loop to create one. The reason for doing so is if I were to have a viewer input a large text document and I would definitely need more than 99 arrays. Does anyone know if the old way of creating arrays has this limit?<br>
<p>REH<br><a href=mailto:hawkdogg@crosswinds.net>hawkdogg@crosswinds.net</a><br><a href=
Yes, it does. ALL javascript arrays have the 99 slot limit, if you excede the 99 slots limit, you will get a "stack overflow at line ..."<br>
<br>
<p>theEclipse<br><a href=mailto: > </a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.