[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] control structure error I can't figure out
Title: Re: [sc-users] control structure error I can't figure out
How about this?
(
var l, m, l_abs, m_abs, curr, prev, next;
//curr = prev = next = 1.0;
l = 7.0;
m = 5.0;
l_abs = l.abs;
m_abs = m.abs;
if(l != m_abs, {
//if l is negative && absolute value of m > absolute value of l - 1
if((l < 0) && (m_abs > (l_abs - 1)), {
1.postln;
});
//if l is negative && absolute value of l - 1 == m
if(l < 0 && (l_abs - 1) == m_abs, {
2.postln;
});
//if l is negative and l - 1 > m
if(l < 0 && (l_abs - 1 > m_abs), {
3.postln;
});
//if l > m && NOT negative
if(l > 0, {
4.postln;
});
});
)
Alistair