CheckArithmeticErrors: Boolean;
The CheckArithmeticErrors property determines whether arithmetic operations used in calculation formulas.
Available values:
True. Arithmetic operations used in calculation formulas are checked on algorithm calculation. If division to zero is executed in a formula, the corresponding message is displayed that specifies the calculation formula and the block.
False. Arithmetic operations used in calculation formulas are not checked on algorithm calculation. If division to zero is executed in a formula, the calculated elements are skipped, and the calculation results in the empty value.
NOTE. Arithmetic operations can be checked if calculation formula is set correctly and calculation result may contain empty values.
For details about checking arithmetic functions see the Algorithm Calculation section.
Executing the example requires that the repository contains a calculation algorithm with the ALGORITHM identifier. Various blocks are created and set up in the calculation algorithm.
Add links to the Algo, Metabase, Ms system assemblies. Add links to the assemblies required for working with calculation algorithms.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObjectDescriptor;
Algo: ICalcObject;
CalcAlgo: ICalcAlgorithm;
Settings: IAlgorithmSettings;
Begin
MB := MetabaseClass.Active;
// Get calculation algorithm
MObj := MB.ItemById("ALGORITHM");
Algo := CalcObjectFactory.CreateCalcObject(MObj, True);
CalcAlgo := Algo As ICalcAlgorithm;
// Get and change calculation execution settings
Settings := CalcAlgo.Settings;
Settings.CheckArithmeticErrors := True;
Settings.MultiThreadedCalc := False;
Settings.PointwiseCalc := True;
Settings.NonPointwiseCalcMode := MsNonPointwiseCalcMode.CalcBefore;
Settings.SaveData := False;
// Check if there are changes in calculation algorithm settings
If Settings.IsDirty Then
// Save changes
CalcAlgo.SaveObject;
End If;
End Sub UserProc;
After executing the example, calculation execution settings will be determined.
See also: