[Overview][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Implements a specialization of TFPGList for Cardinal data types.
Source position: integerlist.pas line 35
public |
||
procedure Sort; overload; |
|
Sorts the Word values stored in the list. |
end; |
|
Implements a specialization of TFPGList for Cardinal data types. |
|
| | ||
? | ||
TObject |
TCardinalList provides an overloaded Sort method to ensure that values in the list are handled using a compare function that operates on Cardinal values. Internally, it provides a TFPGListEnumerator which is specialized for the Cardinal type used in the implementation.
Use the properties and methods defined in the ancestor class to perform common operations for Cardinal values, including:
Items is the default property, and allows access to values by ordinal position or by using an enumerator to traverse the Cardinal values in List.
Example:
// using TCardinalList properties and methods // var // ACardinalList: TCardinalList; // AIndex, ACount: Integer; // AMax, AValue: Cardinal; ACardinalList := TCardinalList.Create; AMax := High(Cardinal); ACardinalList.Add(Random(AMax)); ACardinalList.Add(Random(AMax)); ACardinalList.Add(Random(AMax)); ACardinalList.Add(Random(AMax)); ACardinalList.Insert(2, 42); ACardinalList.Sort; ACount := ACardinalList.Count; AIndex := ACardinalList.IndexOf(ACardinalList.Last); AValue := ACardinalList.Last; ACardinalList.Last := AValue - 1; AValue := ACardinalList.Extract(AInt64List.First); AIndex := ACardinalList.Remove(42); ACardinalList.Clear; ACardinalList.Free;
Another example using TCardinalList can be found in the components/jcf2/ReadWrite/diffmerge.pas unit.
|
Implements a specialization of TFPGList for the Byte data type. |
|
|
Implements a specialization of TFPGList for the Word data type. |
|
|
Implements a specialization of TFPGList for Integer data types. |
|
|
Implements a specialization of TFPGList for Int64 data types. |
|
|
Sorts the Word values stored in the list. |
|
Version 4.0 | Generated 2025-05-03 | Home |