home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
ADV350.ZIP
/
hoursx.for
< prev
next >
Wrap
Text File
|
1990-11-22
|
870b
|
33 lines
SUBROUTINE HOURSX(H,DAY1,DAY2)
C USED BY HOURS (ABOVE) TO PRINT HOURS FOR EITHER WEEKDAYS OR WEEKENDS.
IMPLICIT INTEGER*4 (A-Z)
LOGICAL FIRST
FIRST=.TRUE.
FROM=-1
IF(H.NE.0) GOTO 10
WRITE(*,2) DAY1,DAY2
2 FORMAT(10X,2A4,' OPEN ALL DAY')
RETURN
10 FROM=FROM+1
IF((H.AND.SHIFT(1,FROM)).NE.0) GOTO 10
IF(FROM.GE.24) GOTO 20
TILL=FROM
14 TILL=TILL+1
IF((H.AND.SHIFT(1,TILL)).EQ.0.AND.TILL.NE.24) GOTO 14
IF(FIRST) WRITE(*,16) DAY1,DAY2,FROM,TILL
IF(.NOT.FIRST) WRITE(*,18) FROM,TILL
16 FORMAT(10X,2A4,I4,':00 TO',I3,':00')
18 FORMAT(18X,I4,':00 TO',I3,':00')
FIRST=.FALSE.
FROM=TILL
GOTO 10
20 IF(FIRST) WRITE(*,22) DAY1,DAY2
22 FORMAT(10X,2A4,' CLOSED ALL DAY')
RETURN
END