[futurebasic] reading serial port again

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2004 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <Waverly.Edwards@...>
Date: Mon, 28 Jun 2004 18:28:54 -0400

Is there a way to read the data from the serial port directly into a pointer.
From what I've seen you have to read it into a variable and then move it into your own buffer.
Is this the case or have I missed the boat on this trip?

dim readIntoString as str255
open "C",#somePort,9600,_noparity,_onestopbit,_eightbits,2000
handshake #somePort,_none

numBytes=LOF((somePort),1
read #somePort, readIntoString ; numBytes

I'd like to save time by reading directly into my buffer

// trying to do something like this
myBufferPtr = [myHandle] + bufferOffset
read #somePort, myBufferPtr ; numBytes

Anyone see a way?

Thanks,

W.