[chuck-users] time and truth (bug?)
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.
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
Release me, insect, or I will destroy the Cosmos!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users