# 警告(2432)

# 警告信息

记录 %1!s! 的 %2!s! 重载函数 %3!s! 至少应有 %4!d! 个输入组件. 该函数被忽略.

# 产生原因

记录的重载函数中的输入组件不是所需的数量, 比如记录的二元操作符重载函数所需的输入组件至少是2个, 一元操作符重载函数所需的输入组件至少为1个, 不满足要求则产生错误2432.

# 解决方法

对照记录的重载函数给出所需的输入组件数量.

# 示例

model _2432_OperatorOverlaodArguNumWarning
  operator record Complex
    Real re;
    Real im;
    operator function '*'
      input Complex c;       // Warning 2432,* 是双目运算符因此需要有2个输入组件
      output Complex res;
    algorithm
      res.re := c.re * 2;
      res.im := c.im * 2;
    end '*';
  end Complex;
  Complex c1 = Complex(2, 3);
  Complex c2 = Complex(3, 4);
  Complex c3;
equation
  c3 = c1 * c2;

end _2432_OperatorOverlaodArguNumWarning;