DÅa Friday 14 May 2004 13:23 Charles K. Clarkson napÃsal:
> Aben Siatris <mailto:[EMAIL PROTECTED]> wrote:
> : 
> : is this normal?
> 
>     Is what normal? The output looks okay.
> 
> : what's wrong?
> 
>     The script declares $number twice and your output
> indicates you may not have warnings turned on.
> 
>    What were you expecting that didn't happen?
> 
>    Or what happened you didn't expect?
> 
> 
> : my $number=(0.75-0.54)/0.03;
> : print "$number\n";
> : for (0..$number)
> : {
> :  print "$_ / $number\n";
> : }
> : 
> : my $number=(75-54)/3;
> : print "$number\n";
> : for (0..$number)
> : {
> :  print "$_ / $number\n";
> : }
> : 
> : output:
> : 7
> : 0 / 7
> : 1 / 7
> : 2 / 7
> : 3 / 7
> : 4 / 7
> : 5 / 7
> : 6 / 7
> : 7
> : 0 / 7
> : 1 / 7
> : 2 / 7
> : 3 / 7
> : 4 / 7
> : 5 / 7
> : 6 / 7
> : 7 / 7

at first is 'FOR' from 0..7 and output prints 0..6
at second is 'FOR' from 0..7 and output prins 0..7

it is normal?

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to