[futurebasic] Re: [FB] Closing a comport...

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

From: Barrie <barrie@...>
Date: Wed, 26 May 2004 09:26:18 -0400
> Hello,
> It is my opinion that you should not close a port which you have not opened.
> OsX  allows different programs to open one serial communications port, which
> means that
> the system knows how many times a particular port was opened. I think it
> also assigns separate buffers
> every time an open statement is executed, but then again, I never got to see
> the Os X source code...
> What you are trying to do right now, is to make your program as bulletproof
> as possible, so why
> not keep track of your luggage yourself, rather then depend on something you
> can't control?
> 
> It will not ?unleash? a demon, it is already there - a.k.a. the mess fairy.
> Best regards, Kris
> 
> --
> 
Thanks for your opinion Kris. It gives me food for thought. You are right, I
should keep better track of the open port. In fact I did this with flags but
as you correctly suggested, the "mess fairy" bit me, when I wasn't looking
of course. I'm not yet into OSX, this app is for OS 9.2. So far I haven't
seen any problems with CLOSE,  even if the port is already closed. However,
I would be more comfortable if I could check the port status before I use
the shotgun. I now rephrase my question.
How do I check for an open port?
Thanks 
Barrie