[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Return part of an array
Source position: system.fpd line 86
function Slice( |
const A: ArrayType; |
ACount: Integer |
):ArrayType2; |
Slice returns the first ACount elements from the array A. It returns an array with the same element type as A, but this array is not assignment compatible to any other array, and can therefor only be used in open array arguments to functions.
|
Returns length of a string or array. |
|
|
Set length of a string. |
Program Example113; { Program to demonstrate the Slice function. } procedure ShowArray(const A: array of Integer); var I: Integer; begin for I := Low(A) to High(A) do WriteLn(I, ' : ', A[I]); end; begin ShowArray(Slice([1,2,3,4],2)); end.