i inadvertently found new binary operators in 0.32: the Max-style left-shift and right-shift (<< and >>). the right shift works ok, but i could only get the left shift to shift right. the code in x_arithmetic.c looks ok to me, but ...
bye, B
my test patch:
#N canvas 0 0 450 300 10; #X obj 115 49 <<; #X obj 207 48 >>; #X floatatom 115 86 5 0 0; #X floatatom 207 84 5 0 0; #X obj 97 7 r rgt; #X obj 139 7 r lft; #X obj 185 7 r rgt; #X obj 227 7 r lft; #X obj 10 83 s rgt; #X obj 52 83 s lft; #X floatatom 52 58 5 0 0; #X floatatom 22 10 5 0 0; #X obj 22 34 t f b; #X connect 0 0 2 0; #X connect 1 0 3 0; #X connect 4 0 0 0; #X connect 5 0 0 1; #X connect 6 0 1 0; #X connect 7 0 1 1; #X connect 10 0 9 0; #X connect 11 0 12 0; #X connect 12 0 8 0; #X connect 12 1 10 0;
Bill Sack wsack@acsu.buffalo.edu
Oops. Change:
static void binop2_ls_float(t_binop *x, t_float f) { outlet_float(x->x_obj.ob_outlet, ((int)(x->x_f1 = f)) >> (int)(x->x_f2)); }
to:
static void binop2_ls_float(t_binop *x, t_float f) { outlet_float(x->x_obj.ob_outlet, ((int)(x->x_f1 = f)) << (int)(x->x_f2)); }
Also I had forgotten to put them in the help window, oops bis.
cheers Miller
On Tue, Nov 14, 2000 at 04:03:06PM -0500, Bill Sack wrote:
i inadvertently found new binary operators in 0.32: the Max-style left-shift and right-shift (<< and >>). the right shift works ok, but i could only get the left shift to shift right. the code in x_arithmetic.c looks ok to me, but ...
bye, B
my test patch:
#N canvas 0 0 450 300 10; #X obj 115 49 <<; #X obj 207 48 >>; #X floatatom 115 86 5 0 0; #X floatatom 207 84 5 0 0; #X obj 97 7 r rgt; #X obj 139 7 r lft; #X obj 185 7 r rgt; #X obj 227 7 r lft; #X obj 10 83 s rgt; #X obj 52 83 s lft; #X floatatom 52 58 5 0 0; #X floatatom 22 10 5 0 0; #X obj 22 34 t f b; #X connect 0 0 2 0; #X connect 1 0 3 0; #X connect 4 0 0 0; #X connect 5 0 0 1; #X connect 6 0 1 0; #X connect 7 0 1 1; #X connect 10 0 9 0; #X connect 11 0 12 0; #X connect 12 0 8 0; #X connect 12 1 10 0;
Bill Sack wsack@acsu.buffalo.edu