Applies To:
  • CitectSCADA 1.00 1.01 1.10 1.11 1.20 2.00 2.01 2.10

If you use the ## string operator in labels you must be careful when passing arguments to these labels as extra white space characters are not removed. If this extra white space characters are not removed, then you may get compiler errors caused by incorrect expansion of the string operator. For example if you have the label.

Label Name: TestLabel(arg1, arg2)
Expression: arg1##SP + PV##arg2

and if you called as follows: TestLabel(ABC, DEF); Note there is a space between the ',' and the 'DEF'. You would get the expansion ABCSP + PV DEF, with a space between the PV and the DEF. This is probability not what you wanted to do and would cause a compiler error as the tag PV and DEF does not exist.


You may work around this problem by not putting any spaces between the arguments to this type of label. In you above example you would pass: TestLabel(ABC,DEF);

In version 3.00 and later all leading and trailing spaces in label arguments are stripped so this will no longer be a problem.