• 您的位置我爱Aspx >> VC.Net >> 一个逻辑推理类--从规则推测前提的真假
  • 一个逻辑推理类--从规则推测前提的真假

  • 作者:aspxer  来源:internet  日期:2007-5-21 23:49:31  关键字:
  • void Logic::pushStack(const Logic* self, const Logic* pDummy, LogicOp opCode)This function will put the pointer of each operand, operator, result which is in array of "temp" into Analyse´s stack.E. LogicState Logic::And(LogicState self, LogicState dummy)This is logic "AND"! Have you found out? Say, true=1, false = -1 then result = true "AND" false = (-1*1)There is only one exception: -1*(-1) = 1, so, I only have to judge when two operands are same. In this case, the result issame as any of operand.(true&&true=true; false&&false = false) Even Possible is included by the rule as 1*0=0(Possible with any other state is still possible.)F. LogicState Logic::And(LogicState self, LogicState dummy)This is logic "OR". The result is always the bigger one among two operands. Right? (say true||false= true, even Possiblewhich is 0 also falls within the rule.)G.我对这篇文章有话说?
  • 广告位招租,广告代号:content_468_15
  • 上一篇:一个应用二叉搜索树实现的字典,并存储结构于文件中
    下一篇:windows API简介(系列1)
  • 相关文章