On Mar 13, 2005, at 7:57 AM, loop lopy wrote:
How does writeln knows where to stop printing the string?
If it's a Pascal string, the first byte shows the length of the string. In other words, this assignment:
myS:= 'Test';
puts the value of 4 in the first byte. Your "test[8]:= test[12];" simply grabbed whatever was hanging in memory at the location one past the end of your string and copied it over.
dale