Round - method of object Pm

Returns number rounded to a specified number of decimal or whole places.
Round(nValue As Double, nPrec As Double) As Double
n = Pm.Round(nValue, nPrec])
nValue(Double) A number to be rounded off.
nPrec(Double) Positive number indicating accuracy (number of decimal or whole places) to round the number to. For example:
0.01 = rounding to hundreths
0.1 = rounding to tenths
0.5 = rounding to five tenths
1 = rounding to whole numbers
10 = rounding to tens
25 = rounding to the closest multiple of 25
The method can also be called in the graphic item events for Web panels.

The method is functional also in Macro expression $.expr and in the onDraw event of the PmiCanvas graphic item.

In the variable of Var type, it is possible to set automatic rounding in the configurator Rounding.
JavaScriptVBScriptSelect and copy to clipboard

var pi = 3.141159;
var nVar = Pm.Round(pi, 0.01);  //Returns 3.14
PROMOTIC 8.3.23 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Round
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice