disk8: Initial commit
[pdp8.git] / sw / adventure / YES.FT
1 LOGICAL FUNCTION YES(X,Y,Z)
2 C
3 C PRINT MESSAGE X, WAIT FOR YES/NO ANSWER. IF YES, PRINT Y AND LEAVE YEA
4 C TRUE; IF NO, PRINT Z AND LEAVE YEA FALSE. SPK IS EITHER RSPEAK OR MSPEAK.
5 C
6 INTEGER REPLY,X,Y,Z
7 C
8 1 IF(X.NE.0)CALL RSPEAK(X)
9 CALL GETIN(REPLY,JUNK1,JUNK2,JUNK3)
10 IF(REPLY.EQ.'YES'.OR.REPLY.EQ.'YE'.OR.REPLY.EQ.'Y')GOTO 10
11 IF(REPLY.EQ.'NO' .OR. REPLY.EQ.'N')GOTO 20
12 C WRITE(4,9)
13 C9 FORMAT(/' PLEASE ANSWER THE QUESTION.')
14 CALL SIXOUT('P]LEASE ANSWER THE QUESTION.',15,0)
15 GOTO 1
16 10 YES=. TRUE.
17 IF(Y.NE.0)CALL RSPEAK(Y)
18 RETURN
19 20 YES=.FALSE.
20 IF(Z.NE.0)CALL RSPEAK(Z)
21 RETURN
22 END