' *** TIME_NEW.LST *** 2nd GFA-Manual, page 3-11 > PROCEDURE time_new(colon!) ' ' *** Enter new system-time (input at current cursor-position) ' *** Format of time-string must be "hh:mm:ss" (colon!=TRUE) or "hh.mm.ss" ' *** Advantage of point as separator is faster input on numeric keypad ' *** With colon, format "h:m:" is allowed ' *** No error-checking! ' *** System-time is not changed if you press immediately ' *** Procedure uses VT52-command Esc K to clear the line (on TOS-screen!) ' LOCAL column,line,x$,inputtime$ column=CRSCOL line=CRSLIN IF colon! REPEAT ! colon as separator PRINT AT(column,line);"time (hh:mm:ss) : ";CHR$(27);"K"; FORM INPUT 8,x$ UNTIL LEN(x$)>=4 OR x$=CHR$(13) inputtime$=x$ ELSE REPEAT ! point as separator PRINT AT(column,line);"time (hh.mm.ss) : ";CHR$(27);"K"; FORM INPUT 8,x$ UNTIL LEN(x$)=8 OR x$=CHR$(13) inputtime$=MID$(x$,1,2)+":"+MID$(x$,4,2)+":"+MID$(x$,7,2) ENDIF SETTIME inputtime$,DATE$ RETURN ' ********* '