Append
procedure Append(S: string);
Example
procedure AppendStatus(const Items: TStringList);
begin
Items.Append('Complete');
end;
Usage
Append adds one string by calling Add and discarding the returned index.
- Prefer
Addwhen subsequent logic needs the actual index. - Do not use
Appendto bypass sorting or duplicate policy. - The call mutates the list and may invoke change events.
Additional Technical Info
Append is declared by hidden ancestor TStrings and is normally used through a concrete visible descendant such as TStringList. Despite its name, a sorted concrete list can place the value somewhere other than the physical end.
Source-backed behaviour
The installed RTL implementation consists solely of Add(S). Virtual dispatch therefore preserves the concrete descendant's sorting, duplicate, comparison, allocation and event behaviour.
No index is returned. On an unsorted TStringList it behaves like an append; on a sorted one it behaves like sorted insertion, and duplicate policy may ignore or reject the value.
Related members
Add is the exact terminal call. AddObject adds an association, and Strings provides indexed access.