Hello I am have a problem getting out of a while loop, i am bringing in ascii code from ports on three diferent machines in to the serial port on a computer, two of the machines give form feed (12) at the end of the printout but one machine does not it only gives out line feed and carriage return (10)(13) is there another way of getting out of this loop, my be to do with the readbuffer being empty, please help
Andy.
Input = serialport1.readchar
While input <>(12)
Dataline =””
While input<>(10)
If input<(32) then
Else
Dataline = dataline & chr (input)
End if
Input = serialport1.readchar
End while
Input = serialport1.readchar
w.writeline (dataline)
End while
Listbox1.items.add (“closing file”)
w.flush() ‘w is the stream writer
w.close()
Andy.
Input = serialport1.readchar
While input <>(12)
Dataline =””
While input<>(10)
If input<(32) then
Else
Dataline = dataline & chr (input)
End if
Input = serialport1.readchar
End while
Input = serialport1.readchar
w.writeline (dataline)
End while
Listbox1.items.add (“closing file”)
w.flush() ‘w is the stream writer
w.close()