Content


NTL
Core
CFunctionPlus

CFunctionPlus


Class provides implementation of the plus operator + for expressions. It is being used by expression runners.

If one of the operands is a string, both operands are converted to strings and the result is a string. If one of the operands is a float number, both operands are converted to float numbers and the result is a float number. Otherwise all operands are converted to integer numbers and the result is an integer number.

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class CFunctionPlus :public CFunction
{
public:
    // IFunction methods 
    bool Run() override;

    CFunctionPlus(IErrorListener *error_listener, IFunction *operand1, IFunction *operand2);
};
Namespace: nitisa::script
Include: Nitisa/Modules/Script/Functions/Arithmetic/FunctionPlus.h