[chuck-users] osc to keyboard

Martin Ahnelöv operagasten at gmail.com
Tue Dec 4 14:27:52 EST 2007


tis 2007-12-04 klockan 18:18 +0100 skrev Kassen:
> 
> 
> On 04/12/2007, Martin Ahnelöv <operagasten at gmail.com> wrote:
>         
>         The syntax should look like this (I've made some notes):
>         
>         // if followed an expression in brackets. if there are
>         mutliple, use
>         // "and" followed by a new expression between brackets (you
>         can also use 
>         // "or" instead of "and".
>         // The curly brackets come after the whole if-statement.
>         // No "then".
>         if (msg.isButtonDown()) and (msg.my_keynumber = 65) {
> 
> 
> I'm sorry but I really don't think you can do that. I don't think I
> ever saw "and" used in a ChucK context and I can't get this to run; 
> 
> if ( true and true ) <<<"poof">>>;
> 
> or this;
> if ( true) and (true ) <<<"poof">>>;
> 
> While this works;
>  
> 
> if ( true && true ) <<<"poof">>>; 
> 
> If I'm wrong, could you give a example along those lines that uses
> "and" and will run?
> 

No, you're right. I just thought "and" and "or" was in there, since they
are pretty common in languages with this kind of syntax. My bad. Gonna
go edit my sintax file. IT DECEIVED ME!!!1

Gasten




More information about the chuck-users mailing list