LRDIED ;SLC/RWF - EDIT ; 8/5/87 10:38 ;
;;5.2;LAB SERVICE;;Sep 27, 1994
RW ;
S DG=Y I $D(DTIME)[0 S DTIME=99999
L W:$X>50 ! R " Replace ",X:DTIME G D:X="",Q:X?1"^".E,Q:X?."?",Q:X="@",E:X="END"!(X="end")
I Y[X S D=X D H G D:'$T S Y=$P(Y,D,1)_X_$P(Y,D,2,999) G L
S D=$P(X,"...",1),DH=$F(Y,D) I DH S X=$P(X,"...",2,99),X=$S(X="":999,1:$F(Y,X,DH)) I X S DH=DH-$L(D)-1,D=X D H I S Y=$E(Y,1,DH)_X_$E(Y,D,999) G L
W $C(7)," ??" G L
H R " With ",X:DTIME Q:X?.ANP W $C(7),"??" G H
E D H I S Y=Y_X G L
D W:'$T $C(7) I DG'=Y S X=Y W !?3 W X I X="" S X="@"
Q Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRDIED 571 printed Nov 22, 2024@17:23:59 Page 2
LRDIED ;SLC/RWF - EDIT ; 8/5/87 10:38 ;
+1 ;;5.2;LAB SERVICE;;Sep 27, 1994
RW ;
+1 SET DG=Y
IF $DATA(DTIME)[0
SET DTIME=99999
L if $X>50
WRITE !
READ " Replace ",X:DTIME
if X=""
GOTO D
if X?1"^".E
GOTO Q
if X?."?"
GOTO Q
if X="@"
GOTO Q
if X="END"!(X="end")
GOTO E
+1 IF Y[X
SET D=X
DO H
if '$TEST
GOTO D
SET Y=$PIECE(Y,D,1)_X_$PIECE(Y,D,2,999)
GOTO L
+2 SET D=$PIECE(X,"...",1)
SET DH=$FIND(Y,D)
IF DH
SET X=$PIECE(X,"...",2,99)
SET X=$SELECT(X="":999,1:$FIND(Y,X,DH))
IF X
SET DH=DH-$LENGTH(D)-1
SET D=X
DO H
IF $TEST
SET Y=$EXTRACT(Y,1,DH)_X_$EXTRACT(Y,D,999)
GOTO L
+3 WRITE $CHAR(7)," ??"
GOTO L
H READ " With ",X:DTIME
if X?.ANP
QUIT
WRITE $CHAR(7),"??"
GOTO H
E DO H
IF $TEST
SET Y=Y_X
GOTO L
D if '$TEST
WRITE $CHAR(7)
IF DG'=Y
SET X=Y
WRITE !?3
WRITE X
IF X=""
SET X="@"
Q QUIT