Applies To:
  • CitectSCADA 3.xx, 4.xx, 5.00

Summary:
The Cicode function StrGetChar() returns a negative number if the ASCII value of the character is greater than 127. 

Solution:
A workaround is to write a Cicode Function to add the required amount to the StrGetChar call. E.g.

INT
FUNCTION
MyStrGetChar(STRING sString, INT nOffset)
   INT nChar;

   nChar = StrGetChar(sString, nOffset);
   IF nChar < 0 THEN
      nChar = nChar + 256;
   END
   RETURN nChar;
END

CIT has confirmed this to be a problem in Citect for Windows versions 3.4/4.2 to 5.00. This problem has been fixed in version 3.4/4.2 Service Pack J, Version 5.00 Service Pack D and Version 5.01.

 

Keywords:
 

Attachments