Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function TIAPosMulti(TIA, ints: TIntArray): TIntArray;
- var
- i, h: Integer;
- begin
- h := High(ints);
- if ((High(TIA) > -1) and (h > -1)) then
- begin
- SetLength(Result, (h + 1));
- for i := 0 to h do
- Result[i] := TIAPos(TIA, ints[i]);
- end else
- SetLength(Result, 0);
- end;
- var
- TIA: TIntArray;
- begin
- ClearDebug;
- SetLength(TIA, 20);
- FillTIAEx(TIA, [1, 2, 3, 4, 5]);
- WriteLn(TIAToStr(TIA));
- WriteLn('[1, 5, 9] positions in TIA: ' + TIAToStr(TIAPosMulti(TIA, [1, 5, 9])));
- SetLength(TIA, 0);
- end.
Advertisement
Add Comment
Please, Sign In to add comment