System.Slice

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Slice(var A: array; Count: Integer): Pointer;

Properties

Type Visibility Source Unit Parent
function public System.pas System System

Description

Returns a subsection of an array.

In Delphi code, use Slice to select a subsection (slice) of an array to be passed as an open array parameter. Slice is only allowed as a parameter in a call to a procedure or function that expects an open array parameter. Slice selects the first Count elements of the array given by A to be passed as an open array parameter. A can be an open array parameter itself, allowing dynamically allocated arrays to be passed to open array parameters.

See Also


Code Examples

Retrieved from "https://docwiki.embarcadero.com/Libraries/Sydney/e/index.php?title=System.Slice&oldid=624926"