Sign in Join
FPDoc Onlineexperiment

TFPNegateOperation class

In unit fpExprPars

Internally used class for numeric negation operations

Declaration

pascal
TFPNegateOperation = class(TFPUnaryOperator)

Inheritance

  1. TFPNegateOperation
  2. TFPUnaryOperator
  3. TFPExprNode
  4. 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

Methods

CheckpublicValidate the negation operation for correctness
NodeTypepublicGet the result type for negation operations
GetNodeValuepublicCalculate the negated value
AsStringpublicGet string representation of negation operation

Inherited

From TFPUnaryOperator (6)

Create Destroy HasAggregate InitAggregate Operand UpdateAggregate

From TFPExprNode (3)

CheckNodeType IsAggregate NodeValue

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.