if statement question

Dec 13, 2011 at 1:57pm

if statement question

Is it possible to give if statements an argument so that it bangs when a number falls within a certain range? So for example if a number is less than 4 but greater than 3.

I tried [if $i1 >x

Or if there’s a better way to do this then please enlighten me…thanks!

Dec 13, 2011 at 2:04pm

[if $f1<4. && $f1>3. then bang] – check out the “multiple conditions” subpatch in the [if] helpfile.

You can also use the [split] object, but it will be as though the above used < = and >=.

Dec 13, 2011 at 2:44pm

Brilliant, most helpful thanks.

I did have a look at the multiple conditions subpatch but found it a wee bit confusing.

Anyway thanks a bunch!


You must be logged in to reply to this topic.