Hi, normally one can clear a string with
Code: Select all
StringVar := '';
Code: Select all
const NrPrevCommands = 3;
var PrevCommands: array[NrPrevCommands] of string[10];
..
for I := 0 to (NrPrevCommands - 1) do
begin
PrevCommands[I] := ''; // <---- does not work, string is not "emptied"
Uart1_Write_Text(PrevCommands[I]); // added for test purposes
Uart1_Write_Text(CRLF);
end;
Code: Select all
for I := 0 to (NrPrevCommands - 1) do
begin
PrevCommands[I][0] := 0; // <---- does work
Uart1_Write_Text(PrevCommands[I]); // added for test purposes
Uart1_Write_Text(CRLF);
end;
p.s. code was compiled for P16F877A