> Is there any way to detect or trap this condition?
> 
> I am creating a dynamic array that is not necessarily being 
> filled from 1 to N.  But rather could be filled in any order 
> such as 2, 4, 1.  When this happens, any array element below 
> the value added is an "undefined array element".  But I can't 
> seem to pragmatically determine that so that I can fill it.
> 
> Not, I just realize that a structure would probably server me 
> better, but still for future reference can the undefined 
> array element be captured?

I would argue that it's a mistake to use the position of an element within
an array to mean anything other than, well, the position of that element
within the array. Array elements should be contiguous.

To answer your actual question though, the only way I know to deal with this
is to use an exception handler when referencing array elements.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236981
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to