Sign in Join
FPDoc Onlineexperiment

TCaseOperation.AsString function

Member of TCaseOperationpublicIn unit fpExprPars

Get string representation of case operation

Declaration

pascal
function AsString: AnsiString; override

Function result

Returns string representation of the case

Description

The AsString method returns a human-readable string representation of the case operation, showing the condition and all case branches in a format that can be used for debugging or display purposes.

The string format typically follows the pattern:

CASE condition
  WHEN value1 THEN result1
  WHEN value2 THEN result2
ELSE
  default_result
END.

making the case logic clearly visible for analysis and debugging.

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