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. 

/Stefan

On Thu, Jul 24, 2008 at 8:35 AM, Kassen <signal.automatique@gmail.com> wrote:
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@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users




--
Release me, insect, or I will destroy the Cosmos!