[fpc-pascal] serial.pp - I can't talk to modem

Michael Müller mueller_michael at nikocity.de
Thu Jan 3 11:45:27 CET 2008


Am 02.01.2008 um 15:39 schrieb Bernd Mueller:

> Graeme Geldenhuys wrote:
>
>>   SerWrite(serialhandle, s, Length(s));
>
> SerWrite(serialhandle, s[1], Length(s));

Why not adding an overloaded SerWrite() that simply expects a string?

procedure SerWrite(handle, string);
begin
   SerWrite(handle, string[1], Length(string));
end;

This s[1] vs. s issue is popular with blockread/write too.

Regards

Michael



More information about the fpc-pascal mailing list