Simulator problem with INCOMM(2)
The handling of INCOMM() in the simulator is wrong. INCOMM() is supposed to return a value of -1 if there are no characters in the receive buffer. However when running the simulator INCOMM() returns a value of 0.
This behavior converts the following code to an endless loop rather than a flush of the receiver buffer:
while (INCOMM(2) <> -1)
' flush receive buffer for this serial port
endwhile
[/font][/color]
I supposed I could add a loop counter to break the loop after 256 iterations to work around the simulator...
Sorry,
Gary D