Using get with a com port

For issues with communication ports, protocols, etc.
Post Reply
bixbyru
Posts: 6
Joined: Mar 13, 2023 1:08

Using get with a com port

Post by bixbyru »

Hey there -

I'm not having any luck using GET with a COM port;.

Since the thing is not random access, I have no idea what to put in the second field; further, leaving it blank doesn't work.

Help?
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Using get with a com port

Post by coderJeff »

bixbyru wrote: Mar 13, 2023 1:20 I'm not having any luck using GET with a COM port;.
See Get (File I/O) in the wiki. Are any of the examples close to what you need?
Reading from a COM port very similar to reading from a file.

Most simply to read the next byte from file (or COM port) previously opened in binary mode

Code: Select all

dim b as ubyte
get #1,,b  '' where #1 is a file number previously opened
bixbyru
Posts: 6
Joined: Mar 13, 2023 1:08

Re: Using get with a com port

Post by bixbyru »

Hey there -

Sorry; hadn't looked back here because I eventually figured it out.

Thanks, though!
Post Reply