It is a GOTO.

I think that you should place a limit to the While/Wend othewise if the Chr 13 doesn't arrive, gotchar=gotchar+1 will grow bigger than your array, and you will corrupt some data in your program.

If gotchar>X then do something could help.

Al.