Thread dynamisch mehrdimensionales Array (19 answers)
Opened by sebi85 at 2010-10-27 10:09

topeg
 2010-10-29 15:19
#142326 #142326
User since
2006-07-10
2611 Artikel
BenutzerIn

user image
vereinfacht:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
my %DATA_HASH;
for(my $i=0;$i<@FUNCTION_ARRAY;$i++)
{
  if($FUNCTION_ARRAY[$i]->gi() eq 'TestFunction')
  {
    my $temp_func = $FUNCTION_ARRAY[$i++]->att('name');

    while($FUNCTION_ARRAY[$i]->gi() eq 'Parameter')
    {
      my $temp_param = $FUNCTION_ARRAY[$i++]->att('name');
      while($FUNCTION_ARRAY[$i]->gi() eq 'ParameterValue')
      { push(@{$DATA_HASH{$temp_func}->{$temp_param}},$FUNCTION_ARRAY[$i++]->att('value')); }
    }
    $i-- if($FUNCTION_ARRAY[$i]->gi() eq 'TestFunction');
  }
}

View full thread dynamisch mehrdimensionales Array