substitute

Examples


The substitute statement substitutes specified values for replacement markers in the specified string.

Syntax

substitute string, string_expr {, addl_string_expr}

Parameters

string – Any string that can be set, containing the string that substitute strings will be added to. This string contains replacement markers (%1, %2, %3 and so on) that will be replaced by the values of the string_expr and addl_string_expr parameters. For instance, the replacement marker in the string “Account %1 doesn’t exist.” would be replaced by a string_expr value, resulting in a string such as “Account 001-4432-05 doesn’t exist.”

string_expr – The first string expression to substitute for the %1 replacement marker.

addl_string_expr – Additional string expressions to substitute for the additional replacement markers, %2, %3 and so on, in string.

Comments

If there are more parameters than replacement markers, the extra parameter strings are ignored. Replacement markers that don’t have items substituted for them will appear in the string.

 

The substitute statement is useful for customizing message strings by specifying the exact problem that has occurred.


Documentation Feedback