Annotation of freem/contrib/%GL.m, revision 1.1
1.1 ! snw 1: %GL ; A.Trocha; Global List Utility 01/28/1999 02:55/GMT+1
! 2: ; $Source: /cvsroot-fuse/gump/FreeM/mlib/%GL.m,v $
! 3: ; $Revision: 1.3 $ $Date: 2000/02/18 15:13:41 $
! 4: ;
! 5: N gl,orig,index,i,str
! 6: N %TIM,%TIM1,%TIM2
! 7: D INT^%T
! 8: W !,?20,"FreeM - Global Lister Utility"
! 9: W !,?24,"xx-JAN-99 "_%TIM1
! 10: query W !!,"Global selector: ^"
! 11: R gl
! 12: S gl="^"_$TR(gl,"^"_$C(34))
! 13: I $E(gl,$L(gl))="(" S gl=$E(gl,1,$L(gl)-1)
! 14: I $P(gl,"(")="^" Q
! 15: I '$D(@$P(gl,"(")) W !!," ..Global does not exist",*7 G query
! 16: S ref=$TR($P(gl,"(",2),")")
! 17: I ref'="" D
! 18: . F i=1:1 S str=$P(ref,",",i) Q:str="" I str'=+str S $P(ref,",",i)=$C(34)_str_$C(34)
! 19: . S gl=$P(gl,"(")_"("_ref_")"
! 20: S orig=gl I $F(orig,")") S orig=$E(orig,1,$L(orig)-1)
! 21: W !
! 22: I $D(@gl)-11#2=0 W !,gl,"=",$C(34),@gl,$C(34)
! 23: F S gl=$Q(@gl) Q:gl=""!($E(gl,1,$L(orig))'=orig) D
! 24: . W !,gl,"=",$C(34),@gl,$C(34)
! 25: G query
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>