View Single Post
  #3  
Old 06-24-2006, 02:44 PM
JustBreathe JustBreathe is offline
Registered User
Join Date: Jun 2006
Posts: 59
JustBreathe is on a distinguished road
Custom Array's would solve a lot of these problems...

PHP Code:
for ( element: array )

maps to:

while ( 
element = array.getNextIndex() )

// Array Class
publc function deleteindex )
  {
  if ( 
index this.curr_index )
    
this.curr_index --;

  for ( 
0this.size(); i++)
    if ( 
index )
      
this.element.(@ ) = this.element.(@ 1);
  }

public function 
size()
  {
  while ( 
this.element.(@temp.count) != false temp.count ++;
  return 
temp.count;
  }

public function 
getNextIndex()
  {
  
this.curr_index ++;
  if ( 
this.size() < this.curr_index )
    return 
false;
  return 
thisthis.curr_index ];
  } 
That would fix it... But that would require something like new TGraalArray();

NOTE: This would also have to remap array[ index ] to array.element.(@ index )
Reply With Quote