38 (104)
8.3.10
scanf()
This function is very similar to the printf() function described earlier, except that it is used for in-
put rather than output. The function reads a string passed from an HTML form object, parses
the string as specified by a template string, and sends the resulting data to the specified argu-
ment. The formatting syntax used is similar to that of the standard C-function scanf().
The function accepts a source, a template string containing zero or more formatting tags, fol-
lowed by a number of arguments. Each argument corresponds to a formatting tag, which deter-
mines how the data read from the HTML form shall be interpreted prior sending it to the
destination argument.
This command cannot be used in e-mail messages.
Syntax:
<?--#exec cmd_argument='scanf("source", "template" [,
argument1, ..., argumentN])'-->
source
Name of the HTML form object from which the string shall be extracted.
template:
Template which specifies how to parse and interpret the data. May contain any number
of formatting tags which determine the conversion prior to sending the data to subse-
quent arguments. The number of formatting tags must match the number of argu-
ments; if not, the result is undefined.
See section “Formatting Tags” below for more information.
argument:
Destination argument(s) specifying where to send the interpreted data. The number of
arguments must match the number of formatting tags; if not, the result is undefined.
At the time of writing, the only allowed argument is ABCCMessage().
See also...
•
Default Output
Scenario
Default Output
Success
“Success”
Parsing error
“Incorrect data format”
Too much data for argument
“Too much data”
ABCCMessage error
ABCCMessage error string (
)
Example
See also...
Example (Set_Attribute):, p. 42
Formatting Tags
Formatting tags are written as follows:
%[*][Width][Modifier]type
Anybus
®
CompactCom
™
40 Common Ethernet Design Guide
HMSI-27–269 2.1