strFormat (Function) |
Top Previous Next |
strFormat is used to format a string. By supplying the function with a format string, a string, and up to 4 numbers, it is possible to format a string. The format string can be specified such that up to 4 numbers can be inserted in a string. Please look at the examples below.
Please note that the 4th value is a DINT type as this allows you to convert large numbers into a string.
Note that the returned string is a dynamic string.
Input: format : STRING This format string can contain up to 4 parameter references written as \1, \2, \3 and \4. Each of these will insert the value in v1, v2, v3, and v4. Please note that a specific number can be referenced more than one time in the format string.
v1 : INT Value for {1} in the format string.
v2 : INT Value for {2} in the format string.
v3 : INT Value for {3} in the format string.
v4 : DINT Value for {4} in the format string.
Returns: STRING A string containing the resulting string from the formatting
Declaration: FUNCTION strFormat : STRING;
Example: INCLUDE rtcu.inc |