You can look at casting as something you use to help the compiler when assigning values to variables that aren&#39;t obviously fit to contain them (like an int for a float variable of a Foo for a Bar variable) - that&#39;s what&#39;s common with copying floats and object references. For learning more about it you can look it up in a Java or C manual, though they&#39;ll contain a bit more than what&#39;s needed in ChucK (which doesn&#39;t have a lot of primitive types for starters). I&#39;m a Java fan, so I&#39;d go here: <a href="http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.5">http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.5</a><div>
<br></div><div>/Stefan</div><div><br></div><div><div><br><div class="gmail_quote">2009/12/12 Kassen <span dir="ltr">&lt;<a href="mailto:signal.automatique@gmail.com">signal.automatique@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2009/12/12 mike clemow <span dir="ltr">&lt;<a href="mailto:gelfmuse@gmail.com" target="_blank">gelfmuse@gmail.com</a>&gt;</span><br><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">

Hi there,<br>
<br>
2009/12/12 Stefan Blixt &lt;<a href="mailto:stefan.blixt@gmail.com" target="_blank">stefan.blixt@gmail.com</a>&gt;:<br>
<div>&gt; Hmm, you shouldn&#39;t have to cast from a subclass to its superclass, should<br>
&gt; you?<br>
<br>
</div>Well, this is my feeling as well.  A foo is-a spam.  The object<br>
reference should work fine this way...<br><br></blockquote></div><div><br>I agree. Back when I was starting out when classes and so on I did feel that this functionality was actually implied by the docs. I wonder whether that was intentional and that&#39;s actually meant to be how it should eventually work. This is one area where I do feel that the current docs need work. For one thing the &quot;$&quot; operator is only documented in how it casts from float to int, which is in and of itself a exception in that it loses information, unlike other forms of casting that need not lose information.<br>

<br>Kas.<br></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><br clear="all"><br>-- <br>Release me, insect, or I will destroy the Cosmos!<br>
</div></div>