Server Side Include (SSI) 56 (258)
9.3.9 printf()
This function returns a formatted string which may contain data from the Anybus CompactCom
module and/or application. The formatting syntax used is similar to that of the standard C-func-
tion printf().
The function accepts a template string containing zero or more formatting tags, followed by a
number of arguments. Each formatting tag corresponds to a single argument, and determines
how that argument shall be converted to human readable form.
Syntax:
<?--#exec cmd_argument='printf("template" [, argument1, ..., argumentN])'-->
template: Template which determines how the arguments shall be represented. May contain any
number of formatting tags which are substituted by subsequent arguments and format-
ted as requested. The number of format tags must match the number of arguments; if
not, the result is undefined.
See section “Formatting Tags” below for more information.
argument:
Source arguments; optional parameters which specify the actual source of the data
that shall be inserted in the template string. 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...
• ABCCMessage(), p. 60
Default Output
Scenario Default Output
Success (printf() result)
ABCCMessage error ABCCMessage error string (Errors, p. 63)
Example
See ..
• ABCCMessage(), p. 60
• Example (Get_Attribute):, p. 62
Formatting Tags
Formatting tags are written as follows:
%[Flags][Width][.Precision][Modifier]type
Anybus
®
CompactCom
™
40 PROFINET IRT Network Guide SCM-1202-023 EN 1.8