source: FOIAVistA/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XTVCHG.m@ 1757

Last change on this file since 1757 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 900 bytes
Line 
1XTVCHG ;SF-ISC/RWF - VARIABLE CHANGER ;2/3/93 13:45 ;
2 ;;7.3;TOOLKIT;;Apr 25, 1995
3 W !,"VARIABLE CHANGER" K ^TMP($J) X ^%ZOSF("RSEL") Q:$O(^UTILITY($J,0))="" S %X="^UTILITY($J,",%Y="^TMP($J," D %XY^%RCR K ^UTILITY($J)
4 F I=1:1 S X=$T(Z+I) Q:X="" S @("X"_I)=$P(X,";;",2)
5LOOP R !,"VARIABLE TO CHANGE: ",V1:999 Q:V1["^"!(V1="") R " CHANGE TO: ",V2:999 G LOOP:V2="" Q:V2["^"
6 S RN=0,X=" ,'_&![]<>:=-+/\*",G2=X_"()@",G1=X_"(",NL="",L1=$L(V1)
7 X "F I2=0:0 S RN=$O(^TMP($J,RN)) Q:RN=NL ZL @RN W:$X>70 ! W $J(RN,10) S CH=0 X X1 I CH ZS @RN W !"
8 W !,"* DONE CHANGING ",V1," TO ",V2 G LOOP
9Z ;
10 ;;X X3 F I1=1:1 S L=$T(+I1),C=0 Q:L=NL I L[V1 X X2 I C ZR +I1 ZI L W !,L S CH=1
11 ;;F I=1:0 S I=$F(L,V1,I) Q:I<1 I $A(L,I-L1-1)>0,G1[$E(L,I-L1-1),G2[$E(L,I) S L=$E(L,1,I-L1-1)_V2_$E(L,I,999),C=1,I=I-1
12 ;;I $T(@V1)'=NL W !,"The variable ",V1," is used as a line label and DO or GOTO may be changed.",$C(7)
Note: See TracBrowser for help on using the repository browser.