When I use strings in my declaration I get very strange results.
for example
Code: Select all
procedure Uart2_Writeln(var Sin : string[txbufsizeB]);
var cnt : byte;
begin
for cnt:=0 to strlen(Sin) do
begin
Uart2_Write_Char_(Sin[cnt]);
end;
end;
Code: Select all
procedure Uart2_Writeln(Sin : string[txbufsizeB]);
Code: Select all
procedure Uart2_Writeln(Sin : string);
The output from my controller on rs232 is alot of 0 en the text is somewhere within the zeros.
But when I run for example this:
Code: Select all
Uart2_Write_Char_('A');
Uart2_Write_Char_('A');
Uart2_Write_Char_('A');
etc.
There is soemthing funny about strings.
What do I do wrong? is it a compiler setting?
p.s. txbufsizeB is a constant and does not have any effect on the result.
Thanks in advance