asBool method

bool asBool()

Implementation

bool asBool() {
  if ( kind == 1 ) {
    return b;
  }
  if ( kind == 2 ) {
    return num != 0.0;
  }
  if ( kind == 3 ) {
    return str.length > 0;
  }
  return false;
}