File:  [Coherent Logic Development] / freem / contrib / %N.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jan 19 02:04:04 2025 UTC (6 months, 1 week 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

    1: %N	; A.Trocha ; choose Namespace [1999/02/01-22:11:25]
    2: 	; $Source: /home/cvsroot/freem/contrib/%N.m,v $
    3: 	; $Revision: 1.1.1.1 $ $Date: 2025/01/19 02:04:04 $
    4: 	N idx,cnt,tab,dflt
    5: 	;
    6: 	D ^%SYSDEV
    7: 	W @%CLR
    8: 	;
    9: 	D ^%MESS(1,"Choose a namespace to work with:")
   10: 	;
   11: 	;--- load namespaces into ^%UTILITY global
   12: 	K ^%UTILITY
   13: 	S idx="",cnt=0
   14: 	S dflt=$G(^%SYS("NSPACE"))
   15: 	F   S idx=$O(^%SYS("NSPACE",idx)) Q:idx=""  D
   16: 	. S ^%UTILITY($J,cnt)=^%SYS("NSPACE",idx)
   17: 	. s tab(cnt)=idx
   18: 	. I idx=dflt S $P(^%UTILITY($J),"'")=cnt
   19: 	. S cnt=cnt+1
   20: 	S $P(^%UTILITY($J),"'",2)="Namespaces"
   21: 	;
   22: 	;--- invoke Menu
   23: 	S erg=$$^%MEN(8)
   24: 	W !!
   25: 	I erg=-1 W !,"Canceled.",! Q
   26: 	;
   27: 	;--- switch UCI's
   28: 	S erg=tab(erg)
   29: 	S erg=$$switch^%SYSNSP(erg)
   30: 	I erg W !,"Done.",! D prompt^%SYS
   31: 	E  W !,"Failed.",!
   32: 	Q

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>