set method

void set (dynamic v)

Set byte to number or boolean

Implementation

void set(dynamic v) {
  if(v is bool) v = v ? 1 : 0;
  else if(!(v is int)) throw this._gen.error("You must give a boolean or a number to the set function");
  if(v > 127 || v < -128) throw this._gen.error("Byte must be between -128 and 127");
  this._number = v;
}