TStringList.Append

From Soldat Community Wiki
Revision as of 17:54, 23 August 2013 by Mighty (talk | contribs) (new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
procedure Append(S: string)
 S: string to be added

Description

This procedure does exactly the same thing as Add, it just doesn't return the index.

Example

The below example will spawn a medkit on the players position whenever he types "Medic!"

var
  s: TStringList;
  i: integer;

begin
  s := File.CreateStringList();
  s.Append('a');
  s.Append('b');
  s.Append('d');
  s.Sort();
  s.Sorted := TRUE;

  s.Append('c');
  WriteLn(s.CommaText);
  // a,b,c,d
  s.Free;
end.