Promotic
WikipediaLinkedInYoutubeTwitterFacebook

StringScan - method of the Pm object

Description:
Reading data from the string formatted in the C language convention.
Syntax:
Array StringScan(String sFormat, String sSource)
Parameters:
sFormat(String) Formatting rule written in the C language convention. See C language formatting rule. For real numbers the number of decimal places mustn't be stated (instead of "%5.2f" must be only "%5f").
sSource(String) string from which data are read according to the format
Return values:
This data are returned by the method in the array of values.
Note:

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.

Example:
JavaScriptVBScriptSelect and copy to clipboard

var nTemperature, nPressure;
var sText = "Temperature=25.48, Pressure=112.8";
var aData = Pm.StringScan("Temperature=%5f, Pressure=%5f", sText);
nTemperature = aData.GetItem(0);
nPressure = aData.GetItem(1);
PROMOTIC 9.0.15 SCADA system documentation - MICROSYS, spol. s r.o.

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