File:
[Coherent Logic Development] /
freem /
contrib /
%uglis.m
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs
Sun Jan 19 02:04:04 2025 UTC (2 months, 2 weeks ago) by
snw
Branches:
MAIN,
CoherentLogicDevelopment
CVS tags:
v0-63-1-rc1,
v0-63-0-rc1,
v0-63-0,
v0-62-3,
v0-62-2,
v0-62-1,
v0-62-0,
start,
HEAD
FreeM
%uglis ; Global List Utility - version 0.5.0.1
; A.Trocha - 01/28/1999 02:55/GMT+1
; $Source: /home/cvsroot/freem/contrib/%uglis.m,v $
; $Revision: 1.1.1.1 $ $Date: 2025/01/19 02:04:04 $
;
N gl,orig,i,str,error
W !,$t(+1)," ",$$^%uxdat
s error=$$init^%uxxxx
;
%query s gl="",error=$$readn^%uxxxx("Global selector - ",.gl)
i error<0 q
i gl="" q
S gl="^"_$TR(gl,"^""")
I $E(gl,$L(gl))="(" S gl=$E(gl,1,$L(gl)-1)
I '$D(@$P(gl,"(")) s error=$$rerror^%uxxxx("Global does not exist") G %query
S ref=$TR($P(gl,"(",2),")")
I ref'="" D
. F i=1:1 S str=$P(ref,",",i) Q:str="" I str'=+str S $P(ref,",",i)=""""_str_""""
. S gl=$P(gl,"(")_"("_ref_")"
S orig=gl I $F(orig,")") S orig=$E(orig,1,$L(orig)-1)
s error=$$writen^%uxxxx("")
I $D(@gl)-11#2=0 s error=$$writen^%uxxxx(gl_"="""_@gl_"""")
F S gl=$Q(@gl) Q:gl=""!($E(gl,1,$L(orig))'=orig) D
. s error=$$writen^%uxxxx(gl_"="""_@gl_"""")
G %query
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>