C
C
C-------------------------------------------------------------------------------
C
C	PROGRAM:	HMSTOS
C
C	AUTHOR:		Jan H. Belgraver
C
C	DATE:		12-MAR-81
C
C	PURPOSE:	Converts time in H, M and S into seconds.
C			Input and output both integers.
C
C	BUILDING:	HMSTOSCBC.CMD:
C			F4P HMSTOS,HMSTOS/-SP=HMSTOS
C			TKB @HMSTOSBLD
C			PIP HMSTOS.*/PU
C
C			HMSTOSBLD.CMD:
C			HMSTOS,HMSTOS/-SP=HMSTOS
C			/
C			ACTFIL=1
C			//
C
C-------------------------------------------------------------------------------
C
C

C
C
	PROGRAM HMSTOS
C
C
	INTEGER*4 ISEC, ITIM(3)
C
10	WRITE  (5,101)
101	FORMAT (/'$Enter time in HH MM SS',T25,': ')
	READ   (5,102,END=999,ERR=10) NB, ITIM
102	FORMAT (Q, I2,2(1X,I2))
	IF (NB .EQ. 0) GOTO 999
C
	ISEC = ITIM(1)*3600 + ITIM(2)*60 + ITIM(3)
C
	WRITE  (5,105) ISEC
105	FORMAT (/' Time in seconds',T25,': ',I6)
C
	GOTO 10
C
999	STOP	'ABORTED'
C
	END