var arr:Array = [0,1,2,4,8,16] var gate:int = 0; gate |= arr[1] gate |= arr[2] gate |= arr[3] trace(gate) trace(Boolean(gate&1)) trace(Boolean(gate&4))
时间: 2024-11-17 03:34:01
var arr:Array = [0,1,2,4,8,16] var gate:int = 0; gate |= arr[1] gate |= arr[2] gate |= arr[3] trace(gate) trace(Boolean(gate&1)) trace(Boolean(gate&4))