function cportopen;
%function H=cportopen(Port) opens a serial or parallel communication port for use.
%function H=cportopen(Port,Permissions) opens a file for use.
%
% The parameters are:
%
%Port       - A string specifying the desired port. The supported ports are
%             "com1" to "com8" and "lpt1" to "lpt3".
%Permission - indicates that a file is to be opened (optional)
%H          - The returned port handle, or zero if an error occured. This variable
%             should be kept unchanged throughout the session with the port.
%
%Permission is one of the strings (compatible with fopen):
%        'r'     read
%        'w'     write (create if necessary)
%        'a'     append (create if necessary)
%        'r+'    read and write (do not create)
%        'w+'    truncate or create for read and write
%        'a+'    read and append (create if necessary)
%        'W'     write without automatic flushing
%        'A'     append without automatic flushing

% Written by Eyal Doron, July 1999
% Modified by Andrew Walton, November 2001

error('CPORTOPEN is implemented in a MEX file.');

