IDistribution.Errors

Syntax

Errors: String;

Description

The Errors property returns a message showing all the errors and warnings occurred during calculations.

Example

To execute the example, the form must have the ChartBox component and the UiChart component which serves as the source for ChartBox.

Class MyForm: Form

ChartBox1: ChartBox;

UiChart1: UiChart;

Uniform: SmUniformDistribution;

Values: Array Of Double;

Const Cnt = 10;

 

Sub MyFormOnCreate(Sender: Object; Args: IEventArgs);

Begin

Uniform := New SmUniformDistribution.Create;

Text := Uniform.DisplayName;

Uniform.A := 0.1;

Uniform.B := 0.8;

Values := Uniform.RandomVector(Cnt);

If Uniform.Status <> 0 Then

WinApplication.InformationBox(Uniform.Errors);

End If;

UiChart1.PointCount := cnt;

End Sub MyFormOnCreate;

 

Sub UiChart1OnGetDataValue(Sender: Object; Args: IUiChartGetDataValueEventArgs);

Begin

If Args.PointIndex < Cnt Then

Args.Value := Values[Args.PointIndex];

Args.Result := True;

End If;

End Sub UiChart1OnGetDataValue;

End Class MyForm;

After executing the example a uniform distribution graph is created for the value:

See also:

IDistribution