Unit 'fpexprpars' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TFPNegateOperation

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Internally used class for numeric negation operations

Declaration

Source position: fpexprpars.pp line 462

type TFPNegateOperation = class(TFPUnaryOperator)

public

  procedure Check; override;

  

Validate the negation operation for correctness

  function NodeType; override;

  

Get the result type for negation operations

  procedure GetNodeValue(); override;

  

Calculate the negated value

  function AsString; override;

  

Get string representation of negation operation

end;

Inheritance

TFPNegateOperation

  

Internally used class for numeric negation operations

|

TFPUnaryOperator

  

Internally used class for unary operations with single operand

|

TFPExprNode

  

Class for representing nodes in expression trees

|

TObject

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.

See also

TFPExprNode

  

Class for representing nodes in expression trees


Documentation generated on: Dec 15 2025