PRCUYN ;WISC@ALTOONA/CTB-UTILITY YES/NO READER AND WAIT ;10/22/93 3:35 PM
V ;;5.0;IFCAP;;4/21/95
YN ;
N I,S,Z
K DTOUT S U="^" S:'$D(PRC("YN"))#2 PRC("YN")=3 S S=PRC("YN")
I PRC("YN")=3 S PRC("YN")=""
I '$D(PRC("A",0)) S PRC("A",0)=""
W:PRC("A",0)["!" ! W:$D(PRC("A"))#2 !,PRC("A")
F I=0:0 S I=$O(PRC("A",I)) Q:'I Q:'$D(PRC("A",I)) W !,PRC("A",I)
W:PRC("A",0)["*" $C(7)
W "? ",$P("YES// ^NO// ^<YES/NO> ",U,S)
RX R Z:$S($D(DTIME):DTIME,1:300) E S DTOUT=1,Z=U W $C(7)
S:Z]""!'PRC("YN") PRC("YN")=$A(Z),PRC("YN")=$S(PRC("YN")=89:1,PRC("YN")=121:1,PRC("YN")=78:2,PRC("YN")=110:2,PRC("YN")=94:-1,1:0)
I 'PRC("YN"),Z'["?" G Q1
W:$X>73 ! W $P(" (YES)^ (NO)",U,PRC("YN")) G:PRC("YN")'=0 Q
I $D(PRC("B")),PRC("B")]"" W !!,PRC("B") D C G:'$D(PRC("A")) Q S PRC("YN")=S G YN
I $D(PRC("B")),PRC("B")="" G Q1
I $D(PRC("A")),'$D(PRC("B")) S PRC("YN")=S G YN
Q K PRC("A"),PRC("B") Q
Q1 W:'PRC("YN")&(Z'["?") $C(7) W !,"You must enter a 'Yes' or a 'No', or you may enter an '^' to Quit",! S PRC("YN")=S G YN
Q
C F I=0:0 S I=$O(PRC("B",I)) Q:'I Q:'$D(PRC("B",I)) W !,PRC("B",I)
W ! Q
WAIT ;
W !,"..."
W $P("Whoops,^Hmmm,^Excuse me,^Sorry,^Alright already!^OK! OK!^Alright, I'm tired.","^",$R(7)+1)," "
W $P($T(LIST+$R(8)),";",3)_"..."
LIST ;;This may take a few moments
;;Let me put you on 'HOLD' for a second
;;Please hold on
;;Just a moment, please
;;I'm working as fast as I can
;;Let me think about this for a moment
;;I'm just having one of those days...
;;Is it lunchtime yet?...
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCUYN 1542 printed Dec 13, 2024@02:19:54 Page 2
PRCUYN ;WISC@ALTOONA/CTB-UTILITY YES/NO READER AND WAIT ;10/22/93 3:35 PM
V ;;5.0;IFCAP;;4/21/95
YN ;
+1 NEW I,S,Z
+2 KILL DTOUT
SET U="^"
if '$DATA(PRC("YN"))#2
SET PRC("YN")=3
SET S=PRC("YN")
+3 IF PRC("YN")=3
SET PRC("YN")=""
+4 IF '$DATA(PRC("A",0))
SET PRC("A",0)=""
+5 if PRC("A",0)["!"
WRITE !
if $DATA(PRC("A"))#2
WRITE !,PRC("A")
+6 FOR I=0:0
SET I=$ORDER(PRC("A",I))
if 'I
QUIT
if '$DATA(PRC("A",I))
QUIT
WRITE !,PRC("A",I)
+7 if PRC("A",0)["*"
WRITE $CHAR(7)
+8 WRITE "? ",$PIECE("YES// ^NO// ^<YES/NO> ",U,S)
RX READ Z:$SELECT($DATA(DTIME):DTIME,1:300)
IF '$TEST
SET DTOUT=1
SET Z=U
WRITE $CHAR(7)
+1 if Z]""!'PRC("YN")
SET PRC("YN")=$ASCII(Z)
SET PRC("YN")=$SELECT(PRC("YN")=89:1,PRC("YN")=121:1,PRC("YN")=78:2,PRC("YN")=110:2,PRC("YN")=94:-1,1:0)
+2 IF 'PRC("YN")
IF Z'["?"
GOTO Q1
+3 if $X>73
WRITE !
WRITE $PIECE(" (YES)^ (NO)",U,PRC("YN"))
if PRC("YN")'=0
GOTO Q
+4 IF $DATA(PRC("B"))
IF PRC("B")]""
WRITE !!,PRC("B")
DO C
if '$DATA(PRC("A"))
GOTO Q
SET PRC("YN")=S
GOTO YN
+5 IF $DATA(PRC("B"))
IF PRC("B")=""
GOTO Q1
+6 IF $DATA(PRC("A"))
IF '$DATA(PRC("B"))
SET PRC("YN")=S
GOTO YN
Q KILL PRC("A"),PRC("B")
QUIT
Q1 if 'PRC("YN")&(Z'["?")
WRITE $CHAR(7)
WRITE !,"You must enter a 'Yes' or a 'No', or you may enter an '^' to Quit",!
SET PRC("YN")=S
GOTO YN
+1 QUIT
C FOR I=0:0
SET I=$ORDER(PRC("B",I))
if 'I
QUIT
if '$DATA(PRC("B",I))
QUIT
WRITE !,PRC("B",I)
+1 WRITE !
QUIT
WAIT ;
+1 WRITE !,"..."
+2 WRITE $PIECE("Whoops,^Hmmm,^Excuse me,^Sorry,^Alright already!^OK! OK!^Alright, I'm tired.","^",$RANDOM(7)+1)," "
+3 WRITE $PIECE($TEXT(LIST+$RANDOM(8)),";",3)_"..."
LIST ;;This may take a few moments
+1 ;;Let me put you on 'HOLD' for a second
+2 ;;Please hold on
+3 ;;Just a moment, please
+4 ;;I'm working as fast as I can
+5 ;;Let me think about this for a moment
+6 ;;I'm just having one of those days...
+7 ;;Is it lunchtime yet?...
+8 ;