Hello,
This is for sharing, I am not sure if this information is mentioned anywhere or not.
I started encountering errors like the one below and was unable to load my program. It took more than half an hour to debug, then finally found the cause using the elimination method.
Program (ADDUSERROLE.SCB) Branch () Line 127
at the wrong place M
The cause of this error is that I had declared some SCADA basic lines before the first DIM statement. The error message did not indicate at all what is the actual cause of the error.
Sub SetVisibilityBit()
AddString("b", "aa");
Dim hBuf as long;
Dim lngbuffer1 as long;
dim sSepColumn as str;
TRACE("TRACE", AddString("Start processing visibility bit for ", @User));
End Sub
I did not see also mentioned in PcVue help, that the DIM statements must always be the top lines in each sub before any other instruction, can somebody clarify in case I missed it?
Hello Kantha,
It is written in the help and in the training courses:
We can hope it will be easier to detect in the next Scada Basic environment.
Ludo
Hi Ludo. In the urgency, my eyes were trying to scan for the word DIM everywhere and I didn't find it. Thanks for correcting me wrong.


