当前位置: 首页>>代码示例>>C++>>正文


C++ Executer类代码示例

本文整理汇总了C++中Executer的典型用法代码示例。如果您正苦于以下问题:C++ Executer类的具体用法?C++ Executer怎么用?C++ Executer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Executer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: executeAbsDbl

void executeAbsDbl(Executer &executer)
{
    auto argument = executer.topDbl();
    if (argument < 0) {
        executer.setTop(-argument);
    }
}
开发者ID:thunder422,项目名称:ibcx,代码行数:7,代码来源:mathfunctions.cpp

示例2: executeExponentialIntDbl

void executeExponentialIntDbl(Executer &executer)
{
    auto y = executer.topDbl();
    executer.pop();
    auto x = executer.topIntAsDbl();
    calculatePowerDblDbl(executer, x, y);
}
开发者ID:thunder422,项目名称:ibcx,代码行数:7,代码来源:mathoperators.cpp

示例3: executeCatTmpTmp

void executeCatTmpTmp(Executer &executer)
{
    auto rhs = executer.moveTopTmpStr();
    executer.pop();

    *executer.topTmpStr() += *rhs;
}
开发者ID:thunder422,项目名称:ibcx,代码行数:7,代码来源:mathoperators.cpp

示例4: popIntegerDivisor

inline int32_t popIntegerDivisor(Executer &executer)
{
    auto rhs = executer.topInt();
    checkDivideByZero(executer, rhs);
    executer.pop();
    return rhs;
}
开发者ID:thunder422,项目名称:ibcx,代码行数:7,代码来源:mathoperators.cpp

示例5: popDoubleDivisor

inline double popDoubleDivisor(Executer &executer)
{
    auto rhs = executer.topDbl();
    checkDivideByZero(executer, rhs);
    executer.pop();
    return rhs;
}
开发者ID:thunder422,项目名称:ibcx,代码行数:7,代码来源:mathoperators.cpp

示例6: executeDivideDblInt

void executeDivideDblInt(Executer &executer)
{
    auto rhs = static_cast<double>(popIntegerDivisor(executer));
    auto lhs = executer.topDbl();
    auto result = lhs / rhs;
    executer.setTop(result);
}
开发者ID:thunder422,项目名称:ibcx,代码行数:7,代码来源:mathoperators.cpp

示例7: executeExponentialIntInt

void executeExponentialIntInt(Executer &executer)
{
    auto y = executer.topInt();
    executer.pop();
    auto x = executer.topInt();
    executer.setTop(PowerIntInt{executer, x, y}());
}
开发者ID:thunder422,项目名称:ibcx,代码行数:7,代码来源:mathoperators.cpp

示例8: executeMultiplyIntDbl

void executeMultiplyIntDbl(Executer &executer)
{
    auto rhs = executer.topDbl();
    executer.pop();
    auto lhs = executer.topIntAsDbl();
    multiplyAndCheckResult(executer, lhs, rhs);
}
开发者ID:thunder422,项目名称:ibcx,代码行数:7,代码来源:mathoperators.cpp

示例9: executeSubtractDblDbl

void executeSubtractDblDbl(Executer &executer)
{
    auto rhs = executer.topDbl();
    executer.pop();
    auto result = executer.topDbl() - rhs;
    checkDoubleOverflow(executer, result);
    executer.setTop(result);
}
开发者ID:thunder422,项目名称:ibcx,代码行数:8,代码来源:mathoperators.cpp

示例10: executeCatStrStr

void executeCatStrStr(Executer &executer)
{
    auto rhs = executer.topStr();
    executer.pop();

    executer.setTop(*executer.topStr());
    *executer.topTmpStr() += *rhs;
}
开发者ID:thunder422,项目名称:ibcx,代码行数:8,代码来源:mathoperators.cpp

示例11: executeIntegerDivide

void executeIntegerDivide(Executer &executer)
{
    auto rhs = popDoubleDivisor(executer);
    auto lhs = executer.topDbl();
    auto result = lhs / rhs;
    checkIntegerOverflow(executer, result);
    executer.setTopIntFromDouble(result);
}
开发者ID:thunder422,项目名称:ibcx,代码行数:8,代码来源:mathoperators.cpp

示例12: executeAbsInt

void executeAbsInt(Executer &executer)
{
    auto argument = executer.topInt();
    if (argument < 0) {
        checkNegativeIntegerOverflow(executer, argument);
        executer.setTop(-argument);
    }
}
开发者ID:thunder422,项目名称:ibcx,代码行数:8,代码来源:mathfunctions.cpp

示例13: executeSqr

void executeSqr(Executer &executer)
{
    auto argument = executer.topDbl();
    if (argument < 0) {
        throw RunError {"square root of negative number", executer.currentOffset()};
    }
    executer.setTop(std::sqrt(argument));
}
开发者ID:thunder422,项目名称:ibcx,代码行数:8,代码来源:mathfunctions.cpp

示例14: executeRndInt

void executeRndInt(Executer &executer)
{
    auto argument = executer.topInt();
    if (argument <= 0) {
        throw RunError {"random function on zero or negative number", executer.currentOffset()};
    }
    executer.setTop(executer.getRandomNumber(argument));
}
开发者ID:thunder422,项目名称:ibcx,代码行数:8,代码来源:mathfunctions.cpp

示例15: executeLog

void executeLog(Executer &executer)
{
    auto argument = executer.topDbl();
    if (argument <= 0) {
        throw RunError {"logarithm of non-positive number", executer.currentOffset()};
    }
    executer.setTop(std::log(argument));
}
开发者ID:thunder422,项目名称:ibcx,代码行数:8,代码来源:mathfunctions.cpp


注:本文中的Executer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。