Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDArrayMBS class.

Previous items

CDArrayMBS.subArray(value() as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Subtracts an array from the CDArrayMBS object.
Example
dim src(-1) as Double = Array( 63.1, 10.15, 6.15, 2.88 )
dim data As New CDArrayMBS(array(1.0, 1.0, 1.0, 1.0))

data.subArray( src )

dim lines(-1) as string

lines.Append str(data.count)+" values:"
lines.Append ""
lines.Append str(Data.getvalue(0))
lines.Append str(Data.getvalue(1))
lines.Append str(Data.getvalue(2))
lines.Append str(Data.getvalue(3))

MsgBox Join(lines,EndOfLine)

The array will be subtracted by subtracting each array element from the corresponding element of the CDArrayMBS object.

ParameterDefaultDescription
b(Mandatory)An array of numbers to be subtracted from the CDArrayMBS object.

See also:

CDArrayMBS.subValue(value as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Subtracts a number from every element of the CDArrayMBS object.
Example
dim data As New CDArrayMBS(array(1.0, 2.0, 3.0, 4.0))

data.subValue(5)

dim lines(-1) as string

lines.Append str(data.count)+" values:"
lines.Append ""
lines.Append str(Data.getvalue(0))
lines.Append str(Data.getvalue(1))
lines.Append str(Data.getvalue(2))
lines.Append str(Data.getvalue(3))

MsgBox Join(lines,EndOfLine)

ParameterDefaultDescription
b(Mandatory)A number to be subtracted from every element of the CDArrayMBS object.

CDArrayMBS.sum as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the sum value of the elements of the CDArrayMBS object.
Example
dim data As New CDArrayMBS(array(1.0, 2.0, 3.0, 4.0))
MsgBox str(data.sum) // shows 10.0

CDArrayMBS.trim(startIndex as Integer = 0, len as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Trims the CDArrayMBS object by keeping only some elements in the middle.

ParameterDefaultDescription
startIndex0The index for the first element to keep.
len-1The number of elements to keep. -1 means keeping all elements from the
startIndex to the end of the array.

CDArrayMBS.Values as Double()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Copies all the values of this array object into a Xojo array.

On error the array returned is empty.

Previous items

The items on this page are in the following plugins: MBS ChartDirector Plugin.


The biggest plugin in space...