[fpc-pascal] Access to RS232 ports with fpc

J├╝rgen Hestermann juergen.hestermann at gmx.de
Sun Nov 1 16:24:35 CET 2009

> function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt): LongInt;
>    begin
>    Result := fpRead(Handle, Buffer, Count);
>    end;
> i don't understand the 
> declaration for "buffer" in the function below, because no type is 
> declared for "buffer". 

I believe that the type is irrelevant, you can use whatever you want. I 
think that it's just used by fpRead to buffer data. You only provide the 
space for the buffer but you don't need to read it directly. It seems 
that Count has to be the size of the buffer. But I am just guessing....

More information about the fpc-pascal mailing list