275 of 318
ZBasic System Library 265 ZX Microcontroller Family StatusCom Type Function returning Byte Invocation StatusCom(chan) Parameter Method Type Description chan ByVal Byte The serial channel of interest. Discussion This function returns a set of flag bits that indicate the status of the specified serial channel. The meaning of each of the flag bits is shown in the table below. Serial Channel Status Bit Values Value Meaning &H01 The channel number is valid but may or may not be open. &H02 The channel is open. &H04 The channel has data yet to be transmitted. &H08 The channel is a software UART channel. &H10 The channel’s receive flow control pin is in the inactive state. &H20 The channel’s transmit flow control pin is in the inactive state. The remaining bits are currently undefined but may convey additional information in the future. It is strongly advised that you apply an AND mask to the returned value before comparing it to a fixed value. Doing so will prevent the future addition of bits from affecting your existing code. Compatibility This function is not available in BasicX compatibility mode. See Also CloseCom, ComChannels, ControlCom, DefineCom, OpenCom