Applies To:
  • CitectSCADA v7.x
  • VijeoCitect v7.x

Summary:
When storing the result of StrGetChar() function directly to a string variable tag, compiler will not produce any warning and the string value seems to be stored without any problem. However, it returns a number instead of the character it supposed to be.

Solution:
StrGetChar() function return result is a 'char' which will return the ASCII code of the alphabetical character.

Use StrSetChar() function to set the character onto a new string variable. An example as follows:

STRING NewString, char1;

FOR i = 0 To length DO
char1 = StrGetChar(str, i);
StrSetChar(NewString, i, char1);
END

** Also check KB Q5061 & Q5045 for further information on StrGetChar() function.

Keywords:
 

Attachments