Applies to:
PcVue all versions. |
||
|
||
Summary:
This article defines when you can use the syntax ‘?VarableName’ in SCADA Basic. |
||
|
||
Details:
When you can use ‘?’ The syntax ‘?VariableName’ can only be used in an assignment instruction to force the value of a variable, as in these examples: Dim cVarName As Str; Or Dim cVarName As Str; When you cannot use ‘?’ You cannot use the ‘?VariableName’ syntax to display a variable’s value or to compare it. For example in the following program: Dim cVarName As Str; Register01 is a register variable in the variables tree with the value 99. The following PRINT instruction: PRINT(?cVarName); displays the text Register01 rather than the value of Register01. Similarly in the following code: Dim cVarName As Str; cVarName = “Text01”; The return code ‘iReturn’ will never be 0 (meaning that the contents are identical) because it is not possible to use the ‘?VarName’ syntax in an instruction such as CMPSTRING. |
||
|
||
|
Created on: 05 Nov 2010 Last update: 13 May 2024