MMX4x2 series – User's Manual 111
Scanning and Storing
be scanned according to the pattern and the result will be the value of the variable (number or string type).
Command and Response
ç <loc>:scanf(<path>.<property>;<pattern>)
æ <loc>:scanf
Parameters
Parameter Parameter description
<loc> The location of the variable
1-30
<path>.<property>
<pattern> The pattern that scans the property for the desired result
see below
Pattern options
Pattern Pattern description
%s
%<number>s
%c One character
%<number>c The next <number> of characters
%[<characters>]
%[^<characters>]
%* Ignored part
<custom_text>
The patterns can be combined to get the desired result as shown in the examples.
ATTENTION! Do not forget to escape the % character as shown in below example.
Examples
ç
æ
ç
æ
Further Examples
<path>.<property> <pattern> Scanned result
%s 42
1.6.0b10 r96 %12s 1.6.0b10
T00AA;T00AF %6c T00AA
%*[^,], %s 8N1
T000A;T000B;T000F T000B
lightware-%[0-9]
Reformatting a Value
ATTENTION!
Command and Response
ç <loc>:printf(%s)
æ <loc>:printf
Parameters
Parameter Parameter description
<loc> The location of the variable
1-30
The text before the original value of the property (optional)
Custom
ASCII characters
%s The original value of the variable
The text following the original value of the property (optional)
Custom
ASCII characters
Example
ç
ç
ç
æ
ç
æ