Page 1 of 1

Compilertime: Test of strings of fixed length in structures

Posted: Thu Oct 31, 2019 6:05 pm
by Kurzer
I'm just noticing that I can assign more data to a string of fixed length that is in a structure than it's length is defined.

No Problem to run this code fragments.

Code: Select all

Structure Settings
   ; other values
   sCompression.s{1}
EndStructure

Code: Select all

SettingVariable\sCompression = "123456"
Okay, the data will be truncated and only as much will be stored in the string as it can hold, but can the compiler give a warning in this case? So far he doesn't do this yet.
I didn't realized this at first, because the situation was caused by a wrong search/replace task.

Regards Kurzer