[chuck-users] Flush ChucK IO

Kassen signal.automatique at gmail.com
Fri May 21 12:16:30 EDT 2010


Tom;

>
> Thanks, if this works that’s fine with me a  ftos or .toString() would be
> even better of course ;)
>
>
> Well, all objects have .toString(), but in ChucK primitives aren't objects
so they lack member-functions.

I think a cast should be added because plus-chucking a float to a string
already forms a implicit cast so a explicit one should be fine as well, I
feel. That would be coherent with ChucK being meant to be very readable; a
explicit cast may well be a part of the coder trying to express his
intentions clearly.

Remarkably the Std does supply a tool to go from a string to a number, but
not the other way around.

I say we overload "$" as the most simple and coherent solution.

Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20100521/e58c5290/attachment.html>


More information about the chuck-users mailing list