<div>
<div>Hi, Brad.</div>
<div>&nbsp;</div>
<div>The problem is depth-first message passing.&nbsp; And, in PD, if one outlet connects to two things, the messages&nbsp;are sent in the order the connections were made... which you can't tell by looking.</div>
<div>If you insert a [print] object after your [+ 1] object, you will see that it always outputs 0 before outputting another number.&nbsp; This is because it first sends its output&nbsp;to the [route], which follows its chain of messages&nbsp;through all the way to the [-1( message, BEFORE sending the same output to the [float] object.&nbsp; So after 4, it outputs 0 and 5, then 0 and 6, etc.&nbsp; It sends its result twice, and the second one&nbsp;replaces the -1 message to the float.&nbsp; Solving it would be as simple as deleting the connection to the [route] object and reconnecting it, so that that message is sent last.
</div>
<div>&nbsp;</div>
<div>Also, I don't know if it matters, but the loadbang means that a 0 is sent on opening.&nbsp; You could just make the float object -1 instead of 0, and delete the loadbang, unless you want an initial 0 output on opening.</div>

<div>&nbsp;</div>
<div>-Chuckk</div>
<div>&nbsp;</div>
<div>&nbsp;</div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Date: Sat, 5 Nov 2005 20:36:20 +0100<br>From: Brad Kligerman &lt;<a href="mailto:bkligerman@gmail.com">bkligerman@gmail.com
</a>&gt;<br>Subject: [PD] Building a counter problem<br>To: <a href="mailto:pd-list@iem.at">pd-list@iem.at</a><br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href="mailto:9afc437d0511051136x2bdf06bi50fe74584f14651d@mail.gmail.com">9afc437d0511051136x2bdf06bi50fe74584f14651d@mail.gmail.com
</a>&gt;<br>Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br><br>Skipped content of type multipart/alternative-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: counter-1.pd
<br>Type: application/octet-stream<br>Size: 1186 bytes<br>Desc: not available<br>Url : <a href="http://lists.puredata.info/pipermail/pd-list/attachments/20051105/adc49dff/counter-1-0001.obj">http://lists.puredata.info/pipermail/pd-list/attachments/20051105/adc49dff/counter-1-0001.obj
</a><br><br></blockquote></div>