[chuck-users] time and truth (bug?)

Stefan Blixt stefan.blixt at gmail.com
Thu Jul 24 08:00:36 EDT 2008

I guess this is a consequence of the incompability of certain types, making
code like this generate compile errors:

now $ float => float timeInSamples;

error: invalid cast to 'float' from 'time'...

Same thing with this:

10 => int i;
i $ dur=> dur delay;

A curious thing is that it seems that boolean treatment seems to have been
given a separate implementation for time/dur.


On Thu, Jul 24, 2008 at 8:35 AM, Kassen <signal.automatique at gmail.com>

> Dear list,
> Considering that this is valid;
> if (now) <<<"yay">>>;
> if (second) <<<"hurray">>>;
> I feel that this should be valid as well;
> if (now && true) <<<"this won't parse">>>;
> However, it isn't; ChucK complains the "&&" operator can't be resolved on
> time and int. This is a issue as well;
> if (second && true) <<<"This neither">>>;
> of course we could go...
> if (second) if (now) if (true) <<<"this is silly but runs">>>;
> ...but that looks a bit primitive.
> Yours,
> Kas.
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

Release me, insect, or I will destroy the Cosmos!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20080724/0c9344bc/attachment.htm>

More information about the chuck-users mailing list