Max Taylor wrote: > On Feb 2, 2012, at 15:04 PM, Robert Purves wrote: > >>> In fact, within the last week I had a situation where I had defined a string constant like, "_LableStr$ = "Header for Files" and accidentally put it into a Str15 and causing a collision screwing up another string that followed it in memory because it had one extra character to many. >> >> Please provide an example that reproduces the bug. > Try as I may I can not reproduce that overwrite scramble but I did have a problem with a string last week. > It appears that possibly FBtoC handles the truncation so as to prevent any overwrites. > Even now the following code is truncated automatically and runs without error. > > include "ConsoleWindow" > dim as Str15 aStr1, aStr2 > dim as Str15 aStr3, aStr4 > aStr1 = "Now is the time" > aStr2 = "Now is not the time" > print aStr1, aStr2 > aStr4 = "Now is the time" > aStr3 = "Now is not the time to over write strings" > print aStr3, aStr4 > > Does FBtoC handle this automatically? Yes, it always has. aStr3 = "Now is not the time to over write strings" translates to: PSstrcpyn( aStr3, "\pNow is not the time to over write strings", 16 ); where '16' is sizeof( Str15 ), i.e. length byte + 15 characters.