Extended Arrays

A file that stores type functions to manipulate TExtendedArrays.

The source for this file can be found here.

TExtendedArray.addIndex

procedure TExtendedArray.addIndex(const ext : Extended; const index : Integer);

Used to add a value to a TExtendedArray at a chosen index.

Note

  • by Zyt3x

Example:

TEA.addIndex(1337.0, 0);

TExtendedArray.deleteIndex

procedure TExtendedArray.deleteIndex(const index : Integer);

Used to delete a value of a TExtendedArray at a chosen index.

Note

  • by Zyt3x

Example:

TEA.deleteIndex(0);

TExtendedArray.append

procedure TExtendedArray.append(const ext : Extended);

Used to append a value to a TExtendedArray.

Note

  • by Zyt3x

Example:

TEA.append(1337.0);

TExtendedArray.combine

procedure TExtendedArray.combine(const arr : TExtendedArray);

Used to combine two TExtendedArray variables.

Note

  • by Zyt3x

Example:

TEA.combine(TEA2);

TExtendedArray.returnInArray

function TExtendedArray.returnInArray(const ext : Extended) : Integer;

Returns the index of where the value was found in a TExtendedArray. Returns -1 if not found.

Note

  • by Zyt3x

Example:

writeLn(TEA.returnInArray(1337.0));

TExtendedArray.isInArray

function TExtendedArray.isInArray(const ext : Extended) : Boolean;

Returns True if the value is present in the TExtendedArray.

Note

  • by Zyt3x

Example:

writeLn(TEA.returnInArray(1337.0));

TExtendedArray.include

function TExtendedArray.include(const arr : TExtendedArray) : TExtendedArray;

Returns a TExtendedArray which contains values that are present in both arrays.

Note

  • by Zyt3x

Example:

TEA := TEA2.include(TEA);

TExtendedArray.exclude

function TExtendedArray.exclude(const arr : TExtendedArray) : TExtendedArray;

Returns a TExtendedArray which contains values that are not present in both arrays.

Note

  • by Zyt3x

Example:

TEA := TEA2.exclude(TEA);

TExtendedArray.swap

procedure TExtendedArray.swap(var arr : TExtendedArray);

Used to swap two TExtendedArray variables.

Note

  • by Zyt3x

Example:

TEA.swap(TEA2);

TExtendedArray.clearEquals

procedure TExtendedArray.clearEquals();

Used to clear duplicates in a TExtendedArray.

Note

  • by Zyt3x

Example:

TEA.clearEquals();

TExtendedArray.invert

procedure TExtendedArray.invert();

Used to invert the TExtendedArray.

Note

  • by Zyt3x

Example:

TEA.invert();

TExtendedArray.sum

function TExtendedArray.sum() : Extended;

Returns the sum of all values in a TExtendedArray.

Note

  • by Zyt3x

Example:

writeLn(toStr(TEA.sum()));

TExtendedArray.average

function TExtendedArray.average() : Extended;

Returns the average of all values in a TExtendedArray.

Note

  • by Zyt3x

Example:

writeLn(toStr(TEA.average()));

TExtendedArray.highestValue

function TExtendedArray.highestValue(out index: integer) : Extended;

Returns the highest value found in a TExtendedArray. Aswell as the index of that value.

Note

  • by Thomas

Example:

writeLn(toStr(TEA.highestValue()));

TExtendedArray.highestValue

function TExtendedArray.highestValue(out index: integer) : Extended; overload;

Overloaded function that returns the highest value found in a TExtendedArray.

Note

  • by Thomas

Example:

writeLn(toStr(TEA.highestValue()));