OK, but getting the same result in Perl 5 is almost as easy:
#! perl use strict; use warnings; my $zmax = 60; # Maximum depth in your model my $dz = 0.05; # Grid spacing in z-direction print +($_ * $dz), "\n" for (0 .. int(($zmax / 0.05) + 0.5));
:-)
Athanasius <°(((>< contra mundum
In reply to Re^2: Wrong calculations in for loop
by Athanasius
in thread Wrong calculations in for loop
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |