SageFix. LetsFix!  
Current Location : Home > Web Development > JavaScript > Overloading Arrays for multi-dimensional purposes > Post Share/Save/Bookmark    

Main Menu
SageFix - Let's Fix

Board Categories
    Web Site Designing
- Graphics
    Web Development
- .NET
- Classic ASP
- JavaScript
- PHP
    WebSite Management
- Promotion Techniques
- Search Engine Optimization
    Databases
- MySQL

Tutorials

Database Connection Strings

  Contact Us


Overloading Arrays for multi-dimensional purposes      Jul 26, 2002, 09:14 990450
  
Oh - you mean - without evaluation the names...

Well:

set[0] in one iteration may = 'ECMN'

if you weren't to evaluate it - it would either
take set[0] as the value held in it - or the literal of
the name... either way - not what we'd want.

BUT - the only reason i'm doing it that way is because
i'm generating the arrays automatically.

If you weren't - then you're fine saying:

array['NAME'] = new Array( ARRAYREF1, ARRAYREF2 ... );

where ARRAYREFS are arrays to their own right.
That example takes it to a 4th dimension though - i think.

In this example you'd end up - for sure - with array.length
as 0. To iterate you'd have to use:

for (name in array)

and in that case name would recieve the literal value NAME -
so you'd have to then use:
array[NAME] - to pull up the array referenced - and then indexing ( or a second level of naming ) to pull up the 3rd or 4th dimensions respectively.

Flawless

 









Subscribe to our mailing list
email


Current Location : Home > Web Development > JavaScript > Overloading Arrays for multi-dimensional purposes > Post Share/Save/Bookmark    

Development problem? SageFix is completely free -- paid for by advertisers and donations. Click here to Contact Us If you have any query. Enjoy!
Request processed in 7.0E-5 seconds Home - Contact Us - Terms Of Service - Privacy Policy - Copyrights - Top
Advertisements do not imply our endorsement of that product or service.
Current server time now is 09-Sep-2010 09:48:19
Copyright © 2009 Sagefix Inc. All rights reserved.
Powered By SageFix