MMBasic for Windows - betas


Author Message
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 04:30am 23 Dec 2023      

Hi Bill,
A couple of observations:-

In your first program example I never get a failure - works every time however test$ is alway empty. This is because the time taken to create and OPEN a receive buffer and the command to read the buffer with the INPUT statement is too short for any characters to be received. If you put a PAUSE 100 between OPEN and INPUT it correctly displays characters that have had time to get into the buffer.

The same is true for your second program - no time between OPEN and INPUT$ to allow characters to arrive in the buffer. Again a PAUSE 100 between the two will show received characters.

In all my testing, I have not had any crashes of MMB4W (b23). The only issues I have had are where there are more than 256 characters in the receive buffer without any CR LF in there - this results in a 'string too long error' as expected.

Purely as an observation, if you have an unknown length of data to be received at intermittent intervals, you may choose to insert a specific header byte in the data stream. You can then read and throw away bytes 1 at a time until your wanted message block occurs. You can then read in the required number of bytes (remembering the string length limit of 255).

Regards,
Doug.