Re: [fpc-pascal] serwrite

2007-05-30 Thread Marco van de Voort
> I have written this function where I use serwrite (unit serial). > If I call > > serial.serwrite(prn,pchar(f.bufptr),f.bufPos); > > like this, it puts out garbage. That's odd. It is supposed to write "bufpos" bytes, the first 4 (or 8 on 64-bit) are the exact values of the pointer (p.bufptr

[fpc-pascal] serwrite

2007-05-30 Thread Carsten Bager
I have written this function where I use serwrite (unit serial). If I call serial.serwrite(prn,pchar(f.bufptr),f.bufPos); like this, it puts out garbage. How do I trick the compiler not to "convert a pointer to a pointer"? This works. Function rs232DeviceInout(var f:textRec):integer32; Var