<?xml version="1.0" encoding="windows-1252"?>
<node id="989035" title="Re^2: Wrong calculations in for loop" created="2012-08-22 09:22:45" updated="2012-08-22 09:22:45">
<type id="11">
note</type>
<author id="968231">
Athanasius</author>
<data>
<field name="doctext">
&lt;p&gt;OK, but getting the same result in Perl 5 is almost as easy:&lt;/p&gt;

&lt;code&gt;
#! 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));
&lt;/code&gt;

&lt;p&gt;&lt;tt&gt;:-)&lt;/tt&gt;&lt;/p&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-968231"&gt;
&lt;p&gt;Athanasius&amp;emsp;&lt;font color=#008000&gt;&amp;lt;&amp;deg;(((&amp;gt;&amp;lt;&lt;/font&gt;&amp;emsp;&lt;i&gt;contra mundum&lt;/i&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
989020</field>
<field name="parent_node">
989026</field>
</data>
</node>
