StringFormat - method of the Pm object

Writing an array of values into the string according to the formatting rule.
String StringFormat(String sFormat, Variant vParams)
sFormat(String) Formatting rule written in the C language convention. See C language formatting rule.
vParams(Variant) The parameter can be:
- Elementar data type (Integer, Double, String) if the sFormat contains single value format, or
- Array of values if the sFormat contains multi value format.
This method is functional also in Macro expression $.expr and in the onDraw event of the PmgCanvas object.
This method is also functional in Web panels.
Formatting a single value of the Integer type for hexadecimal view
JavaScriptVBScriptSelect and copy to clipboard

var nVal = 1024;
var sVal = Pm.StringFormat("%05x", nVal);
Formatting multiple values simultaneously
JavaScriptVBScriptSelect and copy to clipboard

var n1 = 11.2;
var n2 = 1002.4;
var aData = Pm.CreatePmArray().Array1(n1, n2);
var sVal = Pm.StringFormat("Temperature=%3.2f, Pressure=%5.1f", aData);
PROMOTIC 9.0.17 SCADA system documentation - MICROSYS, spol. s r.o.

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