Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Foxlib v1.0 - <b>comstat</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
COMSTAT

Syntax:                 COMSTAT

Use:                    To determine if a communications line is data
                        ready.

Parameters:             COM0 for com1, COM1 for com2, COM2 for com3, and
                        COM3 for com4.

Returns:                The first character in the sending parameter will
                        have the status of the communication line.  If you
                        did not pass the parameter correctly (e.g. FOXLIB
                        = "ZOM0"), your sending parameter will be unchanged.

Example:                . load c:\FOXLIB\comstat
                        . FOXLIB = "COM0"
                        . call comstat with FOXLIB
                        . ?asc(substr(FOXLIB,1,1)) = 97
                        .T.
                        . rele modu comstat

                        From this example, the status of communication port
                        1 is: data ready, transfer holding register empty,
                        and transfer shift register empty.  If the return
                        value is not equal to 1 or 97, load and call COMSTAT
                        again to see if any errors disappear.  If you did
                        not receive a value of 1 or 97, then an error
                        occurred, and the communications port may not ready
                        to properly receive data.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson