Using CitectSCADA > Using Labels > Substituting Strings

Substituting Strings

You can pass a string substitution as an argument in a label, for when several variables have part of the variable name in common; for example:

Label Name

SPDev(TAG)

Expression

Prompt("Deviation=" + "IntToStr(CP##TAG## - SP##TAG##));

In the above example, TAG is the common portion of the variable name, and is substituted at each occurrence in the expression. To display the difference between two variables CP123 and SP123, you would specify SPDev(123) in a command, for example:

Command

SPDev(123);

You cannot use a substitution within a string. In the following example, the DESC Parameter (a text description) will not be substituted as it is between quotation marks:

Prompt("Deviation for ##DESC##=" + "IntToStr(CP##TAG## - 
SP##TAG##))

See Also