AZHLSC49 ; IHS/HQW/JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS ; [ 04/09/1999 7:03 AM ]
;;5.0;AZHLSC;;JAN 17,1997
EN ;EP FIND READ COMMAND ENCLOSED IN QUOTES
S AZHLSCF=0
S AZHLSC4I=0
S AZHLSCF2=""""
AZHLISO ; ISOLATE READ COMMAND
S AZHLSCF=$F(Z,AZHLSC49,AZHLSCF) G:AZHLSCF=0 AZHLSCKV
; FIRST QUOTE DETERMINES READ R "ENTER YOUR NAME",X:DTIME
I $E(Z,AZHLSCF,AZHLSCF)=AZHLSCF2 G AZHLSCKV
; DO NOT FLAG R IN QUOTES W !,"R E P O R T"
S AZHLSCF1=$F(Z,AZHLSCF2,AZHLSCF) G:AZHLSCF1=0 AZHLSCR
F I=AZHLSCF:-1 Q:I<1 I $E(Z,I,I)=AZHLSCF2 S AZHLSC4I=1 G AZHLSCKV
G AZHLSCKV
AZHLSCR S AZHLSC4I=1
AZHLSCKV ; KILL VARIABLES
K AZHLSCF,AZHLSCF1,AZHLSCF2
Q
EN1 ;
S AZHLSCF=0
S AZHLSC4I=0
S AZHLSCF2=""""
S AZHLSCF=$F(Z(Z),AZHLSC49,AZHLSCF) I AZHLSCF=0 G AZHLSCKV
; DO NOT FLAG COMMAND IN QUOTES EXAMPLE W !,"R E P O R T"
S AZHLSCF1=$F(Z(Z),AZHLSCF2,AZHLSCF) G:AZHLSCF1=0 AZHLSCKV
S AZHLSCF=AZHLSCF-1
F I=AZHLSCF:-1 Q:I<1 I $E(Z(Z),I,I)=AZHLSCF2 G AZHLSCR
G AZHLSCKV
AZHLSC49 ; IHS/HQW/JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS ; [ 04/09/1999 7:03 AM ]
+1 ;;5.0;AZHLSC;;JAN 17,1997
EN ;EP FIND READ COMMAND ENCLOSED IN QUOTES
+1 SET AZHLSCF=0
+2 SET AZHLSC4I=0
+3 SET AZHLSCF2=""""
AZHLISO ; ISOLATE READ COMMAND
+1 SET AZHLSCF=$FIND(Z,AZHLSC49,AZHLSCF)
IF AZHLSCF=0
GOTO AZHLSCKV
+2 ; FIRST QUOTE DETERMINES READ R "ENTER YOUR NAME",X:DTIME
+3 IF $EXTRACT(Z,AZHLSCF,AZHLSCF)=AZHLSCF2
GOTO AZHLSCKV
+4 ; DO NOT FLAG R IN QUOTES W !,"R E P O R T"
+5 SET AZHLSCF1=$FIND(Z,AZHLSCF2,AZHLSCF)
IF AZHLSCF1=0
GOTO AZHLSCR
+6 FOR I=AZHLSCF:-1
IF I<1
QUIT
IF $EXTRACT(Z,I,I)=AZHLSCF2
SET AZHLSC4I=1
GOTO AZHLSCKV
+7 GOTO AZHLSCKV
AZHLSCR SET AZHLSC4I=1
AZHLSCKV ; KILL VARIABLES
+1 KILL AZHLSCF,AZHLSCF1,AZHLSCF2
+2 QUIT
EN1 ;
+1 SET AZHLSCF=0
+2 SET AZHLSC4I=0
+3 SET AZHLSCF2=""""
+4 SET AZHLSCF=$FIND(Z(Z),AZHLSC49,AZHLSCF)
IF AZHLSCF=0
GOTO AZHLSCKV
+5 ; DO NOT FLAG COMMAND IN QUOTES EXAMPLE W !,"R E P O R T"
+6 SET AZHLSCF1=$FIND(Z(Z),AZHLSCF2,AZHLSCF)
IF AZHLSCF1=0
GOTO AZHLSCKV
+7 SET AZHLSCF=AZHLSCF-1
+8 FOR I=AZHLSCF:-1
IF I<1
QUIT
IF $EXTRACT(Z(Z),I,I)=AZHLSCF2
GOTO AZHLSCR
+9 GOTO AZHLSCKV