PE Option in OPEN COM Statement Enables Parity Checking (51076)






This article was previously published under Q51076

SUMMARY

When opening a communications port (COM1 or COM2) in Microsoft QuickBasic or Microsoft Basic Compiler, the parity is not checked unless the PE option is specified in the OPEN COM statement.

The PE option must be added under the OPEN COM statement (listed alphabetically under OPEN) in the following Basic language references:
  1. The QB Advisor on-line Help system for QuickBasic Version 4.50, under the OPEN COM statement
  2. Page 297 of "Microsoft QuickBasic 4.0: Basic Language Reference" manual for Versions 4.00 and 4.00b
  3. Page 297 of "Microsoft Basic Compiler 6.0: Basic Language Reference" for Versions 6.00 and 6.00b for MS OS/2 and MS-DOS
  4. Page 241 of "Microsoft Basic 7.0: Basic Language Reference" for Microsoft PDS Version 7.00 for MS OS/2 and MS-DOS
  5. The Microsoft Advisor on-line Help system for QuickBasic Extended Version 7.00, under the OPEN COM statement.
  6. Page 375 of "Microsoft QuickBasic Compiler" Versions 2.0x and 3.00 manual
The PE option is documented in the "Microsoft GW-Basic Interpreter: User's Reference" for Versions 3.20, 3.22, and 3.23, under the OPEN COM statement.

MORE INFORMATION

The PE option enables parity checking during communications. A "Device I/O error" occurs if the two communicating programs have two different parities. (Parity can be even, odd, none, space, or mark). For example, a "Device I/O error" occurs when two programs try to talk to each other across a serial line using the following two different OPEN COM statements:
   OPEN "COM1:1200,O,7,2,PE" FOR RANDOM AS #1
				
and
   OPEN "COM2:1200,E,7,2,PE" FOR RANDOM AS #2
				
If the PE option is removed from the OPEN COM statements above, no error occurs.

This information applies to Microsoft QuickBasic Versions 1.00, 1.01, 2.00, 2.01, 3.00, 4.00, 4.00b, 4.50, to Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS, and to Microsoft Basic PDS Version 7.00 for MS-DOS.

Modification Type: Minor Last Reviewed: 1/8/2003
Keywords: KB51076