|
This command represents another way to generate formatted strings.
The first parameter (Expr) passes a string with "static" and "variable" parts. The static parts is normal text. The variable parts are represented with the symbol % (placeholder). The second parameter (ArrExpr) is an array of values that will replace % in the text of the first parameter before STRF return its final result.
The above code will print on screen the following:
In the placeholder symbol % it is possible to add formatting commands enclosing them in []:
The formatting commands enclosed in []have to follow symbol % without any space between them. In other case will be considered as normal text. Additionally, as usually, it is possible to apply formatting commands at the values of the inline array (if an inline array is used in the second parameter):
When the symbol % has to be considered as part of the normal text then is placed as two consecutive %. e.g.
The above will return:
See also PRINTF, PRINT, STR, String formatting. |