Zum Inhalt

.RemoveAt (.datetime[] Objektmethode)

Beschreibung

Diese Funktion entfernt ein oder mehrere Elemente aus dem Array ab einer gegebenen Position. Removes one or more datetime elements starting at Position. Returns the new array size.

Argumente

Name

Typ

Beschreibung

Position

integer

zero-based index of the first element to remove

Count

integer

(optional) Anzahl Elemente, die entfernt werden sollen. Wird die Anzahl weggelassen, wird 1 Element entfernt.

Rückgabewert integer

Anzahl Elemente nach der Operation.

Beispiel

Lt_Time := DateTimeArray (4);
Lt_Time[0] = GetDateTimeValue(2019,5,18,12,5,36);
Lt_Time[1] = GetDateTimeValue(2020,6,19,13,6,47);
Lt_Time[2] = GetDateTimeValue(2021,7,20,14,7,58);
Lt_Time[3] = GetDateTimeValue(2020,6,19,13,6,47);

A = Lt_Time.RemoveAt(2,2);

Ergebnis: A = 2
Lt_Time = [2019-05-18T12:05:35.999,2020-06-19T13:06:47.000]

A = Lt_Time.RemoveAt(2);

Ergebnis: A = 2
Lt_Time = [2019-05-18T12:05:35.999,2020-06-19T13:06:47.000,2020-06-19T13:06:47.000]