In the SIMATIC AX Hardware Declaration Language, the backtick (`) and $ characters have special meaning in string values:
$starts a placeholder expression, for details see Templates`is used as escape character
To include these characters in a string, they need to be escaped using a single backtick.
Thus, to include a single backtick in a string use ``, to include a $, use `$.
The following examples show the usage of these characters in an hardware declaration file:
{
"Property1": "${Example}",
"Property2": "`${Example}",
"Property3": "Example$Value",
"Property4": "Example`$Value",
"Property5": "Example`Value",
"Property1": "Example``Value"
}
- The value of
Property1is interpreted as placeholder expression and only valid inside of a template - The value of
Property2uses a backtick to indicate the value`${Example}should not be treated as placeholder expression - The value of
Property2is invalid, since the$character is reserved. To express a string value that contains the$character, use`$as shown in the value forProperty4 - Similarly, the value of
Property5is invalid, since the`character is used as escape character. To express a string value that contains a backtick character, use``as shown in the value forProperty6