The following program code demonstrates how to get the next and previous elements in a TMult list:
procedure TForm1.Button1Click(Sender: TObject); var Mult: TMult; Subscript: string; begin Mult := TMult.Create(Form1); {Create Mult. Make Form1 its owner} Mult['First'] := 'One'; Mult['Second'] := 'Two'; {Store element pairs one by one} Mult['Third'] := 'Three'; Mult['Fourth'] := 'Four'; Subscript := Mult.Order('Third',1); {Subscript will be Fourth} Subscript := Mult.Order('Third',-1); {Subscript will be Second} Subscript := Mult.Order('THIRD',1); {Subscript will be ''. THIRD subscript does not exist} Subscript := Mult.Order('',1); {Subscript will be First} Subscript := Mult.Order('',-1); {Subscript will be Fourth} end;