[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 COM_ERRCHR()
 Defines the replacement character for a character that is not received
 correctly
------------------------------------------------------------------------------
 Syntax

     COM_ERRCHR(<nComPort>,[<nErrorCharacter|cErrorCharacter>])
        --> lChanged

 Arguments

     <nComPort>  Designates the port (1 to 4) where an external line
     termination character is established.

     <nErrorCharacter|cErrorCharacter>  Designates the individual error
     character, which can be given as a number or a character.  When it is
     not specified, the port functions do not set any error character in the
     buffer.

 Returns

     COM_ERRCHR() returns .T. when the opened port is addressed.

 Description

     It is always possible that characters received during a file
     transmission from the port, UART, are recognized inaccurately.  In such
     cases either an error procedure must be called (i.e.  COM_KEY()) or the
     inaccurate character must be flagged.  During remote transmission, a
     "trash" character is output.  CHR(177) is the default "trash" character;
     however, you can use whatever error character you choose or you can
     suppress the output of a "trash" character entirely.

 Note

     .  The Line Status Register (LSR) setting is used to determine
        whether or not characters were inaccurately received.

 Examples

     .  Use CHR(250) as an error character for port 2:

        ? COM_ERRCHR(2, 250)       // .T., when accepted

     .  Switch off the use of an error character for port 4:

        ? COM_ERRCHR(4)            // .T., when accepted


See Also: COM_READ() COM_LSR()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson