Im not sure why it says chout is disabled, as far as I know it works fine (maybe that page is outdated?). <div><br></div><div>As Jordan said, to print, divide by a duration, which will be the "units". So to get it in seconds you could do:</div>
<div><br></div><div>chout <= "now: " <= now/second <= " seconds" <= IO.newline();</div><div><br></div><div>or even e.g.</div><div>







<p class="">chout<span class=""> </span><=<span class=""> </span><span class="">"now: "</span><span class=""> </span><=<span class=""> </span><span class="">now</span>/<span class="">day</span><span class=""> </span><=<span class=""> </span><span class="">" days"</span><span class=""> </span><=<span class=""> </span>IO.newline();</p>
</div><div>This does raise the question, should times and durations be naturally able to print through FileIO/chout/cherr. </div><div><br></div><div>spencer</div><div><br><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Dec 12, 2012 at 6:48 PM, Jordan Orelli <span dir="ltr"><<a href="mailto:jordanorelli@gmail.com" target="_blank">jordanorelli@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

                <div>two ways to do it that I know of:</div><div><br></div><div>put it on its own line with this:</div><div><br></div><div>
                    <<< T >>>
                </div><div><br></div><div>or just divide by one sample, because that's the base unit of duration:</div><div><br></div><div><br></div><div>T / 1::samp</div><div><br></div><div><br></div><div>will yield the number of samples in the duration.  That's how it's normally printed with <<< T >>> anyway.  Getting the human time like having it say 1.5s would mean you'd have to factor in the current sampling rate, not sure if that's accessible from ChucK code itself.</div>
<span class=""><font color="#888888"><div><br></div><div>-jordan</div></font></span><div class=""><div class="h5"><div><br></div><div><br></div>
                 
                <p style="color:rgb(160,160,168)">On Wednesday, December 12, 2012 at 9:44 PM, Aurélien Bondis wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
                    <span><div><div><div>Hi,</div><div><br></div><div>I don't know for sure if this applies to your version but in the doc it</div><div>says chout and stdout have been disabled</div><div><br></div><div>
<a href="http://chuck.cs.princeton.edu/doc/language/overview.html" target="_blank">http://chuck.cs.princeton.edu/doc/language/overview.html</a></div><div>"For the time being, stdout and chout have been temporarily disabled for</div>
<div>the present release. In their place we have provided a debug print"</div><div><br></div><div>Aurélien</div><div><br></div><div>On Thu, 13 Dec 2012, <a href="mailto:stephane.poirier@oifii.org" target="_blank">stephane.poirier@oifii.org</a> wrote:</div>
<div><br></div><blockquote type="cite"><div><div>Hi All,</div><div><br></div><div>Here below are 3 lines of code in chuck. How could I modify it to output the value of T in the chout?</div><div><br></div><div>// this synchronizes to period</div>
<div>0.75::second => dur T;</div><div>T - (now % T) => now;</div><div>// output to console on stdout</div><div>chout <= 1 <= " foo " <= 5.5 <= IO.newline();</div><div><br></div><div>Regards,</div>
<div><br></div><div>Stephane</div></div></blockquote><div><br></div><blockquote type="cite"><div><div>_______________________________________________</div><div>chuck-users mailing list</div><div><a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a></div>
<div><a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></div></div></blockquote><div><br></div><div>_______________________________________________</div>
<div>chuck-users mailing list</div><div><a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a></div><div><a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></div>
</div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>
            </div></div><br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br></div></div>