[chuck-users] negative duration syntax and bug
Kassen
signal.automatique at gmail.com
Wed Nov 12 23:30:07 EST 2008
Fellow ChucKists,
This is runs;
<<<-1 * second>>>;
Hence we know that negative durations are fine. This, on the other hand
causes a problem;
<<<-1::second>>>;
We can get around that by using this;
<<<(-1)::second>>>;
That one does run but it also seems very clumsy to me.
I'm getting the impression that for durations expressed like -3::second the
minus sign somehow isn't a part of the number while elsewhere it is. This
doesn't strike me as very coherent.
While I was testing some other things around negative durations I noticed
that this will crash with seg-fault;
second -=> now;
Admittedly it would be a type of expression that would only be useful with
negative durations... Probably quite rare but it shouldn't crash the whole
VM like that.
Yours,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20081113/77d2ac53/attachment.htm>
More information about the chuck-users
mailing list