[chuck] (no subject)

Mikael Johansson mikael at johanssons.org
Wed Feb 16 18:01:33 EST 2005


On Wed, 16 Feb 2005, Michael Heuer wrote:
> Hello ChucKers,
>
> Is there any way to go from an int or float value of a variable to a
> duration? e.g.
>
> 1 => int value;
> value::second => dur some_unknown_number_of_seconds;
>
> What I'm really trying to do is math with durations and numbers,
>
> 1::second => dur w;
> (w / 2) => dur h;
>

I have without problem gotten things like
(100.0/3.0)::second => dur foo;
to work. You may want to consider looking into typecasting as well -- I'm 
not certain, though, how that'd work...

> Thank you,
>
>   michael
>
> _______________________________________________
> chuck mailing list
> chuck at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck
>

-- 
Mikael Johansson                 | To see the world in a grain of sand
mikael at johanssons.org            |  And heaven in a wild flower
http://www.mikael.johanssons.org | To hold infinity in the palm of your hand
                                  |  And eternity for an hour


More information about the chuck mailing list