Update maximum aggregate with new value
Source position: fpexprpars.pp line 671
public procedure TAggregateMax.UpdateAggregate; override; |
The UpdateAggregate method processes a new value in the maximum aggregation sequence. If this is the first value, it becomes the initial maximum. Otherwise, the new value is compared with the current maximum and replaces it if larger.
The method handles different data types appropriately, using numeric comparison for numbers and lexical comparison for strings. Type compatibility is maintained throughout the aggregation process.
After processing the first value, the FFirst flag is set to False to ensure subsequent values are properly compared against the established maximum.