in reply to Re: Yet more While issues
in thread Yet more While issues
I got it - at least it's stopped throwing warnings and it's a whole lot faster that what I had before.
Since popnum3 is called from inside an if/else
thenelse { my $pos = -1; push @cPosns, $pos while ($pos = index($zazb, 'c', $pos+1)) >= 0; my $offset = $cPosns[rand @cPosns]; $cell = sprintf '%.2f', popnum3( $x, $y, $copycop, $offset, ); }
sub popnum3 { my ( $x, $y, $z, $offset ) = @_; if ( $y == 0 ) { $aob[$x][0] = $initial * ( 1 + $z ); } else { while (1) { $aob[$x][$y] = $aob[$offset][ $y - 1 ] * ( 1 + $z ); last; } } return $aob[$x][$y]; }
So far it's looking good. Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Yet more While issues
by ikegami (Patriarch) on Mar 16, 2011 at 22:38 UTC | |
by Dandello (Monk) on Mar 17, 2011 at 19:48 UTC |