I've used TRAP as follow's
20 INPUT #16, SERIAL$
30 IF LEN(SERIAL$) <>6 THEN GOTO (BACK TO ENTERING SERIAL AGAIN)
40 LET SERIAL=VAL(SERIAL$)
45 TRAP 40
REST OF PROGRAM FORM HERE ON IN
If I run this with the SERIAL$ of a23456 then TRAP springs into life and returns ERROR 18 AT LINE 40. ERROR 18 is STRING DOES NOT START WITH VALID NUMBER, this is correct and all is well up to here.
If I run with the SERIAL$ of 1a3456 then TRAP does not work at all, the situation is the same for any other digit in the number (apart from the first one as mentioned).
So I have a question:
1) How do I implement TRAP in the above code example so that if any character that made up SERIAL$ was not a number before it was converted to SERIAL the string is not accepted and I am returned back to entering the serial number?
Another two not related questions too:
1) Is there a clear screen command?
2) Is there a line renumber command (ren 10 etc)?
TIA