Sign in Join
FPDoc Onlineexperiment

TJSONArray.Exchange procedure

Member of TJSONArraypublicIn unit fpJson

Exchange 2 elements in the list.

Declaration

pascal
procedure Exchange(Index1: Integer; Index2: Integer)

Arguments

Index1

Index of the first element.

Index2

Index of the second element.

Description

Exchange exchanges 2 elements at locations Index1 and Index2 in the list. This is more efficient than manually extracting and adding the elements to the list.

Errors

If an invalid index (for either element) is passed, an exception is raised.

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