Hi, apparently StrAppendPre (mP 6.4) does not work well with an empty string. The function is not left...
Example:
Code: Select all
program TestStrAppendPre;
{ Declarations section }
var Str: string[50];
begin
{ Main program }
Uart1_init(115200);
delay_ms(100);
Uart1_write_text('start');
Uart1_write_text(#13 + #10);
Str := 'abc'; // non empty string
StrAppendPre('\', Str); // <--- works well
uart1_write_text(Str);
Uart1_write_text(#13 + #10);
Str := ''; // empty string
StrAppendPre('\', Str); // <--- problem, "StrAppendPre" is never left
uart1_write_text(Str);
Uart1_write_text(#13 + #10);
end.