Revision history for KeyPgOpenCom


Revision [22009]

Last edited on 2017-11-21 01:11:27 by JeffMarshall [fix page link name case]
Additions:
This command opens a serial port of the PC, allowing to send and receive data by using the normal file commands as ##[[KeyPgPrintPp|Print #]]##, ##[[KeyPgInputPp|Input #]]##, ##[[KeyPgGetfileio|Get #]]##, ...
Deletions:
This command opens a serial port of the PC, allowing to send and receive data by using the normal file commands as ##[[KeyPgPrintpp|Print #]]##, ##[[KeyPgInputpp|Input #]]##, ##[[KeyPgGetfileio|Get #]]##, ...


Revision [21759]

Edited on 2017-05-25 00:17:59 by fxm [Typo]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Open Com** ( byref //options// [[KeyPgAs|as]] [[KeyPgString|string]], **AS** //filenumber// [[KeyPgAs|as]] [[KeyPgLong|long]] ) [[KeyPgAs|as]] [[KeyPgLong|long]]
//result// = **Open Com**( //options//[,] **AS**[#] //filenumber// )
##//filenumber//##
Deletions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Open Com** ( byref //options// [[KeyPgAs|as]] [[KeyPgString|string]], **AS** //filenum// [[KeyPgAs|as]] [[KeyPgLong|long]] ) [[KeyPgAs|as]] [[KeyPgLong|long]]
//result// = **Open Com**( //options//[,] **AS**[#] //filenum// )
##//filenum//##


Revision [21537]

Edited on 2016-08-13 09:29:20 by fxm [Corrected bad referring to 'Open']
Additions:
The error code returned by ##**Open Com**## can be checked using ##[[KeyPgErr|Err]]## in the next line. The function version of ##**Open Com**## returns directly the error code as a 32 bit ##[[KeyPgLong|Long]]##.
Deletions:
The error code returned by ##**Open Com**## can be checked using ##[[KeyPgErr|Err]]## in the next line. The function version of ##**Open**## returns directly the error code as a 32 bit ##[[KeyPgLong|Long]]##.


Revision [21333]

Edited on 2016-04-06 03:41:33 by fxm [The error code returned can also be checked using Err()]
Additions:
The error code returned by ##**Open Com**## can be checked using ##[[KeyPgErr|Err]]## in the next line. The function version of ##**Open**## returns directly the error code as a 32 bit ##[[KeyPgLong|Long]]##.


Revision [21314]

Edited on 2016-04-03 16:41:11 by fxm [Open Com() returns a 32 bit Long]
Additions:
##**Open Com()**## returns a 32 bit ##[[KeyPgLong|Long]]##: a zero (##0##) on success and a non-zero error code otherwise.
Deletions:
Returns zero (##0##) on success and a non-zero error code otherwise.


Revision [21023]

Edited on 2016-03-13 05:38:20 by fxm [Formatting]
Additions:







Revision [20373]

Edited on 2016-02-10 16:04:17 by DkLwikki [Update link format]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Open Com** ( byref //options// [[KeyPgAs|as]] [[KeyPgString|string]], **AS** //filenum// [[KeyPgAs|as]] [[KeyPgLong|long]] ) [[KeyPgAs|as]] [[KeyPgLong|long]]
A [[KeyPgString|string]] containing options used in controlling the port.
This command opens a serial port of the PC, allowing to send and receive data by using the normal file commands as ##[[KeyPgPrintpp|Print #]]##, ##[[KeyPgInputpp|Input #]]##, ##[[KeyPgGetfileio|Get #]]##, ...
The main parameter is a ##[[KeyPgString|String]]## that describes, at the very least, which communications port to open. It has the format:
- In the //[[CompilerOptlang|-lang qb]]// dialect the old syntax ##OPEN "COMx:...## is supported.
- ##[[KeyPgOpen|Open]]##
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Open Com** ( byref //options// [[KeyPgAs as]] [[KeyPgString string]], **AS** //filenum// [[KeyPgAs as]] [[KeyPgLong long]] ) [[KeyPgAs as]] [[KeyPgLong long]]
A [[KeyPgString string]] containing options used in controlling the port.
This command opens a serial port of the PC, allowing to send and receive data by using the normal file commands as ##[[KeyPgPrintpp Print #]]##, ##[[KeyPgInputpp Input #]]##, ##[[KeyPgGetfileio Get #]]##, ...
The main parameter is a ##[[KeyPgString String]]## that describes, at the very least, which communications port to open. It has the format:
- In the //[[CompilerOptlang -lang qb]]// dialect the old syntax ##OPEN "COMx:...## is supported.
- ##[[KeyPgOpen Open]]##


Revision [17578]

Edited on 2015-04-04 06:40:19 by FxMwikki [In function version of OPEN COM, a comma is not mandatory to separate fields]
Additions:
//result// = **Open Com**( //options//[,] **AS**[#] //filenum// )
Deletions:
//result// = **Open Com**( //options//, **AS**[#] //filenum// )


Revision [17524]

Edited on 2015-04-01 12:23:27 by DkLwikki [integer => long]
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Open Com** ( byref //options// [[KeyPgAs as]] [[KeyPgString string]], **AS** //filenum// [[KeyPgAs as]] [[KeyPgLong long]] ) [[KeyPgAs as]] [[KeyPgLong long]]
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Open Com** ( byref //options// [[KeyPgAs as]] [[KeyPgString string]], **AS** //filenum// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]


Revision [16229]

Edited on 2012-07-28 09:41:35 by CountingPine [Link to Open; formatting]
Additions:
Returns zero (##0##) on success and a non-zero error code otherwise.
This command opens a serial port of the PC, allowing to send and receive data by using the normal file commands as ##[[KeyPgPrintpp Print #]]##, ##[[KeyPgInputpp Input #]]##, ##[[KeyPgGetfileio Get #]]##, ...
The main parameter is a ##[[KeyPgString String]]## that describes, at the very least, which communications port to open. It has the format:
Com port to open. ##"1"##, ##"2"##, ##"3"##, ##"4"##, etc. Some platforms will support more serial ports depending on how the operating system is configured. Where ##//n//## is not given, ##"COM:"## will map to ##"COM1:"##, except on Linux where ##"COM:"## maps to ##"/dev/modem"##
##"300"## (default), ##"1200"##, ..., etc.
##"N"## (none), ##"E"## (even, default), ##"O"## (odd), ##"S"## (space), ##"M"## (mark), ##"PE"## (QB-quirk: checked, even parity)
##"5"##, ##"6"##, ##"7"## (default) or ##"8"##.
##"1"##, ##"1.5"## or ##"2"##. //(default value depends on baud rate and data bits, see table below)//
Since fbc-0.18.4, an alternate IRQ can be specified using the the ##"IR//n//"## protocol option where ##//n//## is ##3## through ##7##.
- In QB, only ##"COM1:"## and ##"COM2:"## are supported. In ""FreeBASIC"", any correctly configured serial port may be used.
Deletions:
Returns zero (0) on success and a non-zero error code otherwise.
This command opens a serial port of the PC, allowing to send and receive data by using the normal file commands as PRINT #, INPUT#, GET #,...
The main parameter is a [[KeyPgString string]] that describes, at the very least, which communications port to open. It has the format:
Com port to open. "1", "2", "3", "4", etc. Some platforms will support more serial ports depending on how the operating system is configured. Where ##//n//## is not given, "COM:" will map to "COM1:", except on Linux where "COM:" maps to "/dev/modem"
"300" (default), "1200", ..., etc.
"N" (none), "E" (even, default), "O" (odd), "S" (space), "M" (mark), "PE" (QB-quirk: checked, even parity)
"5", "6", "7" (default) or "8".
"1", "1.5" or "2". //(default value depends on baud rate and data bits, see table below)//
Since fbc-0.18.4, an alternate IRQ can be specified using the the "IRn" protocol option where "n" is 3 through 7.
- In QB, only ##"COM1:"## and ##"COM2:"## are supported. In FreeBASIC, any correctly configured serial port may be used.


Revision [12921]

The oldest known version of this page was created on 2008-04-14 09:59:08 by AntoniGual [Link to Open; formatting]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode