[chuck] question about types

Ge Wang gewang at CS.Princeton.EDU
Thu Jan 27 18:10:22 EST 2005

Hi Gary!

> I've been fiddling with the ModalBar and TubeBell STK functions, and I 
> wrote
> a subroutine that took a TubeBell. as a parameter:
>     fun int presets( TubeBell bell ) { ... }
> but accidentally called it with a param that was a ModalBar. This did 
> not
> gen a type error and I got silence until I added a param that doesn't 
> exist
> in a TubeBell. Then ChucK complained that it couldn't find TubeBell
> strikePosition.

This is a bug with 1.1.x.x - ugen types are mishandled across function 
It will most certainly be fixed.

> (i.e., why no typing complaint? It took me an hour to find out why I
> was getting silence...)

Sorry about this.  It is precisely this type of uncertainty that ChucK 
is trying
to eliminate, but that hinges on the type checker being correct.  We 
do our best to make things more robust in 1.2.


More information about the chuck mailing list