Declaration¶
Source position: fpexprpars.pp line 462
type
TFPNegateOperation = class(TFPUnaryOperator)
public
procedure Check;
function NodeType : TResultType;
procedure GetNodeValue;
function AsString : AnsiString;
end;
Inheritance¶
Description¶
The TFPNegateOperation class implements numeric negation operations that change the sign of numeric values. It extends TFPUnaryOperator to provide negation-specific functionality for integers, floats, and currency values.
The negation operation converts positive values to negative and negative values to positive, essentially multiplying the operand by -1.
The operation requires that its operand be a numeric type (integer, float, or currency) and produces a result of the same or compatible numeric type.
This class is used internally by the TFPExpressionParser class to construct an AST (Abstract Syntax Tree). There is normally no need for you to use or instantiate this class directly.
Methods¶
| Member | Visibility | Description |
|---|---|---|
| AsString | public | Get string representation of negation operation |
| Check | public | Validate the negation operation for correctness |
| GetNodeValue | public | Calculate the negated value |
| NodeType | public | Get the result type for negation operations |
See also¶
| Name | Description |
|---|---|
| TFPExprNode | Class for representing nodes in expression trees |