&(p1)
public
Logical AND of the bits in stat with num.
fork { exit 0x37 }
Process.wait
sprintf('%04x', $?.to_i)
sprintf('%04x', $? & 0x1e00)
Show source
/*
* call-seq:
* stat & num => fixnum
*
* Logical AND of the bits in _stat_ with <em>num</em>.
*
* fork { exit 0x37 }
* Process.wait
* sprintf('%04x', $?.to_i)
* sprintf('%04x', $? & 0x1e00)
*/
static VALUE
pst_bitand(st1, st2)
VALUE st1, st2;
{
int status = NUM2INT(st1) & NUM2INT(st2);
return INT2NUM(status);
}