When a String variable is displayed,
Citect will display all characters up to the null terminator. Each
character in a string variable will occupy one byte, ie. two
characters per Word. If you define a string that is three words
long, and you put the word "Citect" in the string, the string will
occupy the three words - there will be no room for the null
terminator. The null terminator will occupy one byte in the string.
You must always leave one byte free on the end of the string for
the null terminator.
You don't normally get this problem with Cicode strings because
Citect will always add the null terminator. Howeverr, this can
happen if you create the string with the Cicode function
StrSetChar() and you don't terminate the string.
See Also Q1002 and Q1129. |