Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AZHLSC47

AZHLSC47.m

Go to the documentation of this file.
AZHLSC47 ; IHS/HQW/JN - SAC CHAPTER 2:  M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS ;  [ 01/20/2000  8:30 AM ] [1/20/00 9:44am]
 ;;5.0;AZHLSC;;JAN 17,1997
EN ;EP       FIND COMMENT OR TEXT      
 S Z1=Z(Z)
 S (AZHLSC4I,AZHLSCF)=0
 S AZHLSCF=$E(Z1,2,99) I $E(AZHLSCF,1,1)=";" S AZHLSC4I=1 G AZHLSCKV
 D:$E(AZHLSCF,1,1)="." CHKDOTS
AZHLSCKV ;      KILL VARIABLES
 K AZHLSCF,Z1,AZHLSCSV
 Q
CHKDOTS ; CHECK FOR DO DOTS BEFORE SEMI-COLON IN COMMENTED LINE
 I AZHLSCF="" G CHKBLK
 F I=1:1:$L(AZHLSCF) S AZHLSCSV=I Q:$E(AZHLSCF,I,I)=";"  D DOTBLK Q:AZHLSC4I=1  Q:AZHLSC4I=2  
 I $E(AZHLSCF,AZHLSCSV,AZHLSCSV)=";" S AZHLSC4I=1 Q
 Q
DOTBLK ; CHECK FOR DO DOTS, SEMI-COLON AND IMBEDDED BLANKS
 I $E(AZHLSCF,I,I)="." Q
 I $E(AZHLSCF,I,I)=" " Q
 I $E(AZHLSCF,I,I)=";" S AZHLSC4I=1 Q
 S AZHLSC4I=2 Q  ;
CHKBLK ; CHECK FOR BLANK BEFORE SEMI-COLON IN COMMENTED LINE
 S AZHLSCF=$P(Z1," ",1)_" "
 F I=$L(AZHLSCF):1:$L(Z1) S AZHLSCSV=I I $E(Z1,I,I)'=" " Q
 I $E(Z1,AZHLSCSV,AZHLSCSV)=";" S AZHLSC4I=1 Q
 Q