[chuck-users] What does $ do?
gogogo at unm.edu
Fri Nov 22 13:30:37 EST 2013
Ah! Ok, thanks!
From: Michael Heuer [mailto:heuermh at gmail.com]
Sent: Thursday, November 21, 2013 10:39
To: ChucK Users Mailing List
Subject: Re: [chuck-users] What does $ do?
$ is the cast operator, documented here
In the example you have posted, the specific class of reference.get(i) is not known, so it must be cast to Interval. This is a pattern similar to how collections in java were used before generic types were added to the language.
On Thu, Nov 21, 2013 at 11:29 AM, Gregorio Gomez <gogogo at unm.edu> wrote:
> Hello, everybody:
> I've been looking at Michael Heuer's (most excellent) LiCK library. He uses an idiom that I don't see documented:
> intervals.get(i) $ Interval @=> Interval interval;
> from Arpeggiator.ck, line 35
> What does $ do?
> Of course just because I don't see it in the documentation doesn't mean it's not there, so please feel free to point me to the docs if I've overlooked it.
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
More information about the chuck-users