===) =+%" 407 zzzupack 407 danbcmds 407 ucmds =˨-DEFINED COMMANDS FILE, Version 3.0, created 2002 9 25 6 28 26v(((=ˈ@ =˨ =3@ =X`DDmtoUSER-DEFINED COMMANDS FILE, Version 3.34, created 2002 9 17 21 54 13====+8 #=HHPv(= =H [ MSGCLEARFILE;trap;F;N;T [1] DANB 840701 ERASE FILE HOLDING TRANSFERED WSS [2] MSG'fILE ERASED' trap'c NOPE' F11wORKfILE [3] (N(names[;1122]^.=F)/Tnums)E F stie N((N)N0,T)0 [4] E:F erase N 0 [5] NOPE:MSG'NO FILE TO CLEAR' =(n< RLP COMPACK RP;io;N1;N2;R1;R2;C1;C2;I;C;N;M;LIM;SHOW;OBJ;T;S;ANY;O [1] DANB 880325 PACKAGE COMPARISON [2] [3] FIRST, FIND ALL OBJ NAMES IN EACH PACKAGE [4] show: 1=SHOW NAMES ;2=CONTENTS ;3=BOTH ;0=NOTHING [5] io1 ANY0 [6] SHOW, 2 2 3show R03fd 'O s',cr,'[1](0s)/0RR,,cr,s' [7] R21C2N2pnames RP [8] R11C1N1pnames LP [9] I1C1 I0,I1C2 N1(IC1)N1 N2(IC2)N2 ADJUST DIMENSIONS [10] [11] NAMES KNOWN, DISPLAY HEADER [12] OBJ' OUTSTANDING OBJECTS IN ' OBJECTS NOT APPEARING IN THE OTHER OBJ [13] (^/C1~I0=N2 matiota N1)/S4 [14] O '***',(4 0 +/I),OBJ,'LEFT' SHOW[4]/'O VM FIT IN1' [15] SHOW[1]S4 NCI/I I~ANY1 SHOW INDIVIDUAL OBJECTS [16] B3:(N [18] [19] S4:(^/C2~I0=N1 matiota N2)/S5 [20] O '***',(4 0 +/I),OBJ,'RIGHT' SHOW[5]/'O VM FIT IN2' [21] SHOW[2]S5 NCI/I I~ANY1 SHOW INDIVIDUAL OBJECTS [22] B4:(NLIM)/0 (T(read T1,I)COMPVAR read T2,I)l2 [10] out C,I out T [11] l2:l1,II+1 =ʝ MCOMPBOOL B;BR;BC;R;C;X;Y;Z;I;LI;S;FIX;N;io;F [1] ST [2] BBOOLEAN MATRIX B M IS B WITH SOME OF THE 1'S REPLACED BY 0 [3] M HAS THE PROPERTIES THAT:(1) 1(+/M),+M [4] (2) EACH 1 IS BELOW AND TO THE RIGHT OF THE PREVIOUS 1 [5] (3) +/,M IS A MAXIMUM FOR CONSTRAINTS (1) AND (2) [6] notes IO0, M IS NOT NECESSARILY THE UNIQUE OPTIMAL SOLUTION OF (3) [7] THIS FUNCTION IS ONE OF THE SEVEN WONDERS OF THE MODERN WORLD [8] MAIN ALGORITHM CALCULATES THE BOOLEAN MATRIX X (LINE L1) WHERE : [9] MAX[I;J]+/,COMPBOOL (I,J)B AND XMAX-0 10,MAX [10] THEN USES THIS TO CALCULATE RESULT AT LINE L4 [11] ST:B(BR/B)(BCB)/B GET RID OF ZERO ROWS AND COLUMNS [12] M(B)RCio0 [13] DIAG:N+/^\, 0 0 B FOLLOW DIAGONAL AS FAR AS POSSIBLE [14] M[R+N;C+N]N.=N RR+NN CC+N B(N,N)B [15] X+/^\^/~B Y+/^\^~B NUMBER OF ADJACENT 0 ROWS AND COLS [16] (0=/X,Y)CALC NO ZERO ROWS OR COLS [17] RR+X CC+Y B(X,Y)B DIAG CUT BACK B AND TRY DIAGONAL AGAIN [18] CALC:(0B)END [19] B(FIXI,~III+1)L1 [22] (0=Y1Z)END Y IS THE NUMBER OF MATCHES [23] ZN1B I1+''B INITIALISE LOOP [24] L4:FZS(ZB[I;]+\X[I;])Y [25] X[I;](-S)NF Z(1*F)Z,S II-1 (0YY-F)L4 [26] X[I+1;]0 [27] L8:XBFIXX [28] SB M[R+S[0];C++S[1]]B [29] END:MBRBC\M Ǚ=hq CF1 COMPFN F2 [1] DANB 84/5/30 - COMPARE 2 FNS [2] (F1F2)C'' [3] C0,1(F1)F2 F1(CF1)F1 F2(CF2)F2 [4] CF1 MCOMP F2 E=ʸ211 NCOMPIND B [1] RETURN NOS. FROM 1 TO +/B FOR EACH ELEMENT OF B SUCH THAT [2] N IS STRICTLY INCREASING AND B/N IS +/B(IO=1) [3] N1+\N/N(1N)-1NB/B1,B,1 N[1]=@" rsa COMPV sb;l [1] compare VECTORS [2] r'' (sasb)/0 [3] r'lISTS'' LENGTH: ',(1l),(/l)/' AND ',1l(sa),sb l/l [4] rr,CR,'tHEY ARE THE SAME FOR THE FIRST ',+/^\(lsa)=lsb [5] rr,' AND THE LAST ',(+/^\(lsa)=lsb),' ELEMENTS.' W=||erta CV1 COMPVAR V2;I;N;S;io [1] DANB 84/5/30 - COMPARE 2 VARIABLES. C'' IF V1V2 [2] io0 (V1V2)C'' [3] ((pchk V1)=Npchk V2)/ST C''[N],' OBJECT IS A PACKAGE' 0 [4] ST:NNP CV1 COMPACK V2 0 [5] NP:(=/N(V1),V2)SR C'g' [6] C,C fmt 100N END [7] SR:(1=N''N)/VEC SAME RANK [8] ((V1)V2)SD C'oBJECTS DIFFER IN SHAPE: ',(V1),' AND ',V2 [9] SD:((S10V1)=10V2)SC CC,(0=C)';OBJECTS DIFFER IN TYPE' END [10] SC:((C),2N)/END,SIMPL [11] C'oBJECTS ARE OF RANK >2; THEY DIFFER AT ',(+/,V1V2),' PLACES' END [12] SIMPL:C'OBJECTS ARE ',(50=S)'CHAR ',,svm[N;] (SCL,VEC,MAT)[N] [13] SCL:CC,cr,V1,V2 0 [14] MAT:CC,cr,VM(V1)COMPFNV2 0 [15] VEC:CV1 COMPV V2 [16] END:(1000<+/size 'V1 V2')0 [17] CC,cr,('vAR1:',cr,VMV1),cr,cr,'vAR2:',cr,VMV2 =ʈoo]] CREP DISPLAY OBJ;SEP;L;D;S;io [1] DANB 840629 DISPLAY OBJECT FROM PACKAGE [2] io1 SEP2cr (VAR,FN,PAK,DONNO)['vfp'1OBJ] [3] VAR:(2SDREP)/L1 [4] LD1'}{ ',(S),'D STRUCTURE: ',1,('<>,r<',av[255+io],'>i8')fmt D L2 [5] L1:SLL/Lcr=D(VMREP),cr LL[nlinesS]nlinespw [6] L2:CSEP,1OBJ,(4010REP)' [C]',cr,(LD),(LD)/' ...[MORE]' 0 [7] FN:CSEP,C,(0=CVM('r< >p<[>q<]>bli5' fmt 1+1REP),REP)/1OBJ,'' 0 [8] PAK:(1 2 (S1OBJ)pnc REP)/DONNO,P1 REPS FNCR REP FN [9] P1:REPS pval REP VAR [10] DONNO:CSEP,1OBJ,' IS UNDEFINED !' or =G her MATFIT MAT;io;W;P;F;DIM [1] DANB 840614 RESHAPE CHAR MAT TO FIT PW [2] W:WIDTH; F:NO OF FOLDS; P:PAGE LENGTH [3] FpwW1DIM 0 2 +MAT [4] DIM[io0]FP(1DIM)F [5] MAT(P,FW) 1 0 2 (F,P,W)DIMMAT e=X~~ RObJ FNCR PaK;F [1] return cr of FN in PacKage [2] 3fd 'F;',ObJ,CR,'[1]pdef ObJ psel PaKRCR ObJ' =xc=0h (H3 11( 194  i =(~a BA JDMR1 W;I;N [1] JOT-DOT-MATCH-RANK 1 FOR RANK 2 A AND W [2] SORT OF A.R1 W [3] N1A BA over W I(30=10A)'avB' BB[I;] [4] I[I]+\/B1B [5] BI[N].=NI =Q DM1 MCOMP M2;X;R;C;io [1] MATRIX COMPARISON [2] DISPLAY THE OBJECT M1 TOGETHER WITH THE LINES FROM M2 WHICH ARE [3] note 2=(M1)=M2 AND (1M1)=1M2 [4] io0 XCOMPBOOL M1 JDMR1 M2 R/X C~X [5] D' '[R],'[,q]li4' fmtR ROW NOS, =LEFT, =RIGHT [6] R(COMPIND R),C/COMPIND~C ORDER OF DISPLAY [7] XM1CM2 DD((+/C),6)' ' D(D,X)[R;] [8] X(1+2zone)-zone ZONE OF DISPLAY [9] RR/RD[;2].=' ' RUNIQUE(/R.<0,1D)/R,R.+X [10] DD[R;] =0 PP0 1 ( (" ( "( ( " ("(  "  ( "  ("  ( (     ((    "( ( ( " (  (  " ( ("    "  " "    "  "" ((  ( ( (    ("  ( (  (    (  ((  (  " "    ( "  ("   " (   (    "  ( ( ( "(    ( " ((   ( "  ""     ( ( (" "   ( ""(   (       (  " "  ""  "  (("( " " ((("  (   " (   ""  ( " "(  ( (    ( (  "   " " ""      (   ("     ( " (  "" ( "   "      " ("  (( ((   ( " ("    ( (   "( ( "  (   (    ((( ("  (         ( (  (" (            ( "   (  ((  ((  " "     (" ((    " "  (     ((  (  (  (   (    (   "  "  ((  ( (  "   "     " ("    ("  "        (  ("  ( (    "(  "     "    (  (( "("    " "    (           (       "((     (     "" "  "      (     (  (   "  (  ( (  ( (   " ((   "( "     (  "   " " ((     ( ( "   ("     ("(    (   (  "((  (  ( ""    " ( (  " (    "  (  (  "  " " (" "  "   ( "    "      "  ((   "      (   "     "(         ( "(   (  ( "((      ("   ( "   ("  (    "   ""    (   (  (   "        "(  "((       ( " " (  (( (    0=ʘ*(H( g  BOws CVws a2a amap ap124 aplascii btaskreq del hostap hsp if pc108 socket ssql toolkit tools unix wssearch wstransfer xfer =VVates VUNIQUE V [1] DANB ELIMINATE DOUBLES FROM LIST V [2] V((VV)=V)/V = nCCssiq ZD VM M [1] MATRIX FROM VECTOR [2] ZD matrify M =ʨ&&nt fGet access to file on another account (SAM) DanB 96 Syntax: ]access lib filename /pass=xxxx /accounts= (SAM only) This command will set the access matrix of the file given as argument to contain your account number (or those given to the /accounts switch) full (-1) access with no passnumber.umber.=ʀReturns the address (file,component) of object as TIE DanB 1992 Syntax: ]ADDR object /FILE=ucmdfile (default primary file) Returns the address (file,component) of object as TIE, CPT (0 if not found). Useful when manipulating UCMD files. =ʘ rAlign comments in functions at column DanB 1992 Syntax: ]ALIGN fn1 [fn2] [...fnx] /COL=[40] Align comments in functions at column (COLumn, if not set, defaults to 4).to 4).=ʀc rChange 1st alphabet characters to 3rd (SAM only) Syntax: ]ascii varname Effect: all characters are swiched between 1st to 3rd and from 2nd to 1st. For character vectors only..=Pts [BenchMark expression(s) DanB 1993 Syntax: ]bm exp1 'e x p 2' ... /n=[100] /space[=_] /quote[="] /trap= Will execute each expression N times (default 100) and return MF result Switch does /n= specifies the number of iterations. Default 100. /space specifies the speudo blank character. Default '_'. This allows to do ]bm myfn_arg instead of ]bm 'myfn arg' /quote specifies the speudo quote character. Default '"'. This allows to do ]bm nc"var" instead of ]bm 'nc''var''' /trap allows to specify trapping action inside the fn Result is 2 enclosed tables of expressionstiming, a n3 columns of /n, cpu in line, cpu in calls.IE =99< is available to help. For example, when the prompt 'Sort, Resize, Delete (space to quit)?' appears you enter something like delete (10),24 to 36,45,78 to 87 A confirmation prompt will appear showing all the files affected by the operation (delete or resize) desired. If the operation requires a passnumber to read/rdfi the files NOT ALREADY TIED then it must be specified with the /sizepass switch. If the deletion or resizing of files is desired and a passnumber is required for the files NOT ALREADY TIED then it must be specified with the /writepass switch.over(=## cmdaccess no;mine;tie;CMD1;STASKMODE;accounts;pass;reset [1] give access to file [2] it works 2 ways: you can give other accounts access to YOUR files [3] (no lib no specified) or you can grant yourself access to an other [4] account's file (provided you know the password to the account). [5] In all cases access is additive unless /reset is used. [6] mine~>/vi no1'/= /accounts= /pass= /reset' parse no [7] accountsaccounts default 1ai [8] minenotmine mine(~reset)rdac tiefopen no [9] minemineaccounts, 0 1 1 0 mine stac tie 0 [10] notmine: [11] '/pass= MUST be specified' signal(0pass)11 [12] 7 signon((^\' 'no)/no),':',pass [13] STASKMODE'gather' [14] rstsend '''',no,'''stie 1' [15] (/'error'r)l10 out r end [16] l10:rstsend 'm(0 30)',(~reset)/'rdac 1' [17] (/'error'r)l20 out r end [18] l20:rstsend 'm(',(accounts),',0 1ۢ1 0)mmstac 1' [19] (/'error'r)l30 out r end [20] l30:out 'access granted' [21] end:stsend ')off' =h( cmdaddr o;file [1] dANb 92 return component of object in file [2] : addr [3] o'/= /file=' parse o [4] (file0)/l1 filefopen file [5] l1:resultfile addr o n=zz cmdalign arg;io;cpos;dlm;fns;i;lab;max;n;s;t;col [1] DanB 1992: align FUNCTIONS AT COLUMN [2] [3] io1 dlm1arg1'/col=' parse arg CHECK SWITCHES [4] colcol default 40 [5] l1:fns(1+iargdlm)arg argiarg [6] (3nc fns)/l3 out fns,' not a fn' l4 [7] l3:t\''''=fns(1 2 t)tcr fns [8] (ii/i1lab)^0lab(<\fns[i;]':')+.1s [11] fns[i;]nt[;max],(1max-col+n+lab)(+/^\' '=s)s(0,max)t(-n)fns[i;] [12] out fx fns [13] l4:(arg)/l1 lp=ʀc r cmdascii var;tr [1] danb 19981213 turn text in 1st bet to 3rd and 2nd to 1st [2] trav i(tr'Aa').-io-26 tr[2i]tr[2i] [3] resulttr[avvar] y..=ʈ,,3 cmdbm eXp;B;cR;fF;fM;trap;n;quote;space;trap [1] DanB 1993 benchmark expressions [2] eXp IS A REGULAR [BLANK] DELIMITED LIST OF EXPRESSIONS [3] eXp'/n= /space[=] /trap= /quote[=]' parse eXp nn default 100 [4] traptrap default '' traptrap,(1trap,''),'e erout 1 0' [5] (0space)l20 (1space)l10 space'_' [6] l10:eXp[B/BeXpspace]' ' [7] l20:(0quote)l40 (1quote)l30 quote'"' [8] l30:eXp[B/BeXpquote]'''' [9] l40:B'r(221*dya) fm f' (1112av='')L50 [10] SAX version [11] B'dyagetr1 MF f0''get:r1MF f' [12] L50:Bfx>'rx fM f;dya''dya2nc''x'''B [13] Bout 0 0 fM fx cR>'fF'آ1cR1 fM 'fF' = 0 cmdcalls xF;xFS;io;xST;xNL;xBR;xS;full;maxlevel;xML [1] dANb 840921 ALL OBJECTS OF ALL CALLS MADE BY ARGUMENT [2] /full IS fULL sEARCH (REPEAT SEARCH FOR ALREADY PROCESSED FNS) [3] /maxlevel IS MAXIMUM LEVEL TO LOOK FOR [4] : cmdcalls crfromvr xC1 xCOMPARE xDF xEQ xFr xFT xGENSYMB xMV xQZ xRD xTREEGEN [5] xF1'/full /maxlevel=' parse xF [6] xFSfull xMLmaxlevel default 9999 io1 xBR 0 0 '' [7] xST(1,xST)xST'',xNLxF [8] xTREEGEN xF = cmdchecklib arg;er;io;ps;trap;a;cd;ctl;inp;i;limits;msg;n;sz;s;tied;ties;tn;toe;t;A;F;P;Q;SAM;S;sizepass;sort;writepass [1] Check current library contents. Allow to delete/resize files. [2] 'arg' is pattern and used to set passnumbers and sort. [3] [4] arg'/= /sort= /sizepass= /writepass=' parse arg [5] (1(0,1ai)1fi arg)4 [6] out '** Cannot perform this command on another user account' [7] 0 [8] If sort not set then sort is on names otherwise it applies [9] to column as in /sort=ts d [10] 4:sizepassfisizepass in case special permission is needed [11] writepassfiwritepass for size and resize/delete [12] limits40 this is for SHARP APL under Unix [13] ps 1 1 0 1 io1 [14] n9999fx>'rQ q''arbout 0q r' fn [15] [16] on SAM we can ask for file system data [17] SAM87av'a' SAMl15 [18] l10:(0>svn nn+1)l10 find suitable clone id [19] out 0 0 0 1 0 svc n(1 2 1002 1) svo n'ctl' ask server [20] out 'Quotas (VC/MF/CF/MS/CS): ',limits4ctlctl'qui f' [21] l15:(S1Fu 'flib ',arg,'/n')none [22] F(S,22)(10 0 1ai),1 ' ',F 22 column format [23] [24] on SAM a user may possess files on another account [25] (SAMS=limits[3])l20 out '* Some files are not shown.' [26] l20:sz 0 5 i0 [27] tied/tnF^.=names tiest,((t)tnums)0 tntn,1 [28] F 0 11 F [29] [30] Find data for each file. File already tied are assumed to use PW=0 [31] [32] trap'19 c l150' skip files you can't access [33] l100:(S'ad')l206 [59] out '** Invalid sort specs - sort ignored',CR l209 [60] [61] l206:sort>t[2] ts1t (2t)l208 name? [62] na[;(4t)2] (t 3 4)l208 date, time? [63] n(t=4+5)/sz (t<9)l208 n-/sz[; 4 3] [64] l208:('d'sort)l209 nn [65] [66] These vars (F, sz, tn) must be kept in sync [67] l209:a1000000a[n;] FF[n;] szsz[n;] tied/ 0 1 tntn[n;] [68] ts((S)Fج>t)>,<9<(0) 4+ta,sz[;4],-/sz[; 4 3] [69] out t [70] [71] Clean up section [72] [73] l210:out toe0 [74] [75] allow to either resize or delete files [76] (a'dDrR'1nQ 'Sort/Delete/Resize ? (space to quit) ')/l215 [77] sort1n ('sS'1n)/l202 new sort [78] space,return quits. Argument is a list of line numbers [79] (' '1n,';')l210,end [80] l215:s,a2 2 7 'deletedresized' (0')5 Ff,,' ',read tie addr f(B1)F [8] 5:F1(B1BF=' ')/F [9] 10:(0fNtie addr f(BF' ')F)20 ' NOT IN FILE' 30 [10] 20:Rcr f (0rep)25 Rrep [11] 25:fN(crfromvr read fN) COMPFN R [12] (0fN)/' (NO CHANGE)' [13] 30:(FBF)/10 N D.=ONE cmdcompmat a;io;zone;C;D;M1;M2;R;X;file [1] dANb 84 MATRIX COMPARISON [2] DISPLAY THE OBJECT M1 TOGETHER WITH THE LINES FROM M2 WHICH ARE [3] mODIFIED 940115 TO COMPARE FROM FILE [4] : COMPBOOL JDMR1 COMPIND UNIQUE [5] io1 d1a'/file[=]' parse a a1a Dad [6] M1C(D-1)a (0file)l10 Xt (1file)l5 Xfopen file [7] l5:M2read X addr C l20 [8] l10:M2Da [9] l20:XCOMPBOOL M1 JDMR1 M2 R/X C~X [10] io0 [11] D'- '[R],'[,q]li4' fmtR ROW NOS, -=LEFT, +=RIGHT [12] R(COMPIND R),C/COMPIND~C ORDER OF DISPLAY [13] XM1 over CM2 DD((+/C),6)'+ ' D(D,X)[R;] [14] X(1+2zone)-zone2 ZONE OF DISPLAY [15] RR/RD[;2].='- ' RUNIQUE(/R.<0,1D)/R,R.+X [16] resultD[R;] o=1    cmd cmdcompufile p;io;a1;a2;a;b;f;h;i;j;m;n1;n2;tn;t1;t2;v1;v2;zone;T1;T2 [1] COMPARES TWO USER COMMAND FILES [2] SYNTAX: ]ucomp FILE1 FILE2 [3] : fit [4] EXTRACT THE a AND b FILE NAMES [5] ioizone1 pmatrify p [6] (i>1p)/l8 a(a' ')/ap[i;] ii+1 [7] (~vi a)/l10 (i>1p)/l8 aa,' ',(t' ')/tp[i;] ii+1 [8] l10:(i>1p)/l8 b(t' ')/tp[i;] ii+1 [9] (~vi b)/l9 (i>1p)/l8 bb,' ',(t' ')/tp[i;] l9 [10] l8:'*** YOU MUST PROVIDE TWO FILE NAMES' 0 [11] READ THE FILE DIRECTORIES [12] l9:tnnums t1fopen a hread t1,2 a1read t1,h[2] [13] n1read t1,h[3] a1a1[iava1;] [14] t2fopen b hread t2,2 a2read t2,h[2] n1n1[i;] [15] n2read t2,h[3] a2a2[iava2;] [16] n2n2[i;] [17] FIND NEW AND MISSING OBJECTS [18] f0 FLAG SET IF ANY DIFFERENCES [19] ja2 matiota a1 (~0j)/l3 [20] CR,' OBJECTS FOUND ONLY IN FILE ',a,':' fit(j=0)a1 f1 [21] l3:ja1 matiota a2 (~0j)/l4 [22] CR,' OBJECTS FOUND ONLY IN FILE ',b,':' fit(j=0)a2 f1 [23] l4: [24] aa,':' tb,':' a((a)t)a [25] b(a)t i0 [26] l1:((j)zi3,i3,2p<:>zi3' fmt 1 6 100ftimerep n1[j[i];3] [36] T1'cnh'[io+ 0 0 20v1] [37] ' IN FILE ',a,' [',T1,'], =',(v1),', LAST MOD=',t [38] t,'i2,2pzi3,i3,2p<:>zi3' fmt 1 6 100ftimerep n2[i;3] [39] T2'cnh'[io+ 0 0 20v2] [40] ' IN FILE ',b,' [',T2,'], =',(v2),', LAST MOD=',t [41] (^/(2(v1),v2),'c'=T1,T2)/l5 [42] CR,' ' [43] l1 SKIP COMPARISON IF NOT CHAR VECTOR OR MATRIX [44] l5:(2=v1)/l6 (n1[j[i];1]=3)/l5f v1CR matrify v1 l6 [45] l5f:v1crfromvr v1 [46] l6:(2=v2)/l7 (n2[i;1]=3)/l6f v2CR matrify v2 l7 [47] l6f:v2crfromvr v2 [48] l7:v1 COMPFN v2 l1 [49] l2:(~f)/'NO DIFFERENCES.' =ʨ F F cmddebug a;io;b;d;e;i;line;l;n;stop;top;trace;S [1] Activates or deactivates stops and traces for a set of functions [2] Syntax:]DEBUG {fcn names} /STOP= /TRACE= /LINE=line nums /TOP[=n] [3] [4] This version differs from APL+Win in syntax: [5] Using /stop or /stop=on sets stops (same for traces);=off removes them. [6] /top affects only top fns on stack [7] [8] io1 S113av'' SAM? [9] Parse the command line [10] a'/= /stop[=] /trace[=] /lines= /top[=]' parse a [11] We are assuming here that no function will have more than 2048 lines [12] lineslines default '2048' default is to list all lines [13] (iferrin 'l',lines)03 [14] out '*** invalid line numbers' 0 [15] 03:linesl [16] ((0stop)^0trace)05 [17] Both stop and trace absent means /stop=on [18] stop1 09 [19] Validate trace & stop. /stop is same as /stop=on [20] 05:n'off'01'on' stop2+n0)/lines [37] d(S/'d+/s',a[i;],'l'),(~S)/'dl stop a[i;]' [38] (~iferrin d)/5 change stop setting [39] ER(~errmsg'domain error')/errmsg pass up other errors [40] ER(01 fd a[i;])/errmsg err is unexpected unless fcn is locked [41] dl [42] 5:e~dl (trace=0)17 l(trace>0)/lines [43] SAM will ALWAYS report a change [44] d(S/'d+/t',a[i;],'l'),(~S)/'dl trace a[i;]' [45] (~iferrin d)/17 change trace setting [46] ER(~errmsg'domain error')/errmsg pass up other errors [47] ER(01 fd a[i;])/errmsg err is unexpected unless fcn is locked [48] dl [49] 17:ee~dl [50] nn+e count num fns for which stop/trace was changed [51] 3 Endloop [52] 26:b^/e0trace,stop d'Changed ',(e[1]/'trace '),b/'and ' [53] out d,(e[2]/'stop '),'settings for ',(n),' functions out of ',1a = prtl rcmddfts lines;io;all;b;fnrep;fn;lines;t [1] danb 20020922 Display Function on Top of Stack [2] Usage: ]dfts 2 to 19, 23 to 67, 99 or all~2 3 4 [3] io1 (/b/'*'=t2 ws 2)er2 fn(^\fn'[')/fnt[b1;] [4] (lines^.=' ')select [5] (0t1 fd fn)er2 out t [6] 0 [7] select: [8] all1+1fnrepcr fn (0all)er2 [9] (iferrin 'lines,lines')er1 [10] (0lines(linesall)/lines)er3 [11] only some lines requested, see which ones [12] out('p<[>i5,<] >' fmt lines),fnrep[1+lines;] [13] 0 [14] er1:out '*** Wrong line numbers' 0 [15] er2:out '** Unable to see top function' 0 [16] er3:out '* No lines selected' 0 = 5 5 cmddisplay 0;ps [1] DanB 20020924 ]display a la APL+Win [2] ps2/- 1 2 [3] (iferrin 'result0')0 [4] out errmsg jXb=mm cmd cmddownload arg;trap;ctl;nohsp;tn;t;H;PCfile;file;fn;tr;var [1] Download file to PC - must be running HDS108 type software [2] (223runs)l10 file (arg) may be tie no [3] out '* Not with IDSH' 0 [4] l10:tn1fi arg1'/= /file= /fn= /tr= /var' parse arg [5] fx>'rx nohsp c''r(~H1,c)/c' H1av to NOT process HSP [6] varl18 vararg arg'pcxfrtmp' (iferrin 'tnfopen arg')l16 [7] (arg,' 12000') create tn1+/0,nums [8] l16:drop tn,-/2size tn var append tn l20 [9] l18:((1t)^>/tvi arg)l20 [10] (iferrin 'tnfopen arg')l20 [11] out '** Cannot open <',arg,'>' 0 [12] l20:PCfilefile default(+/^\arg' 0123456789')arg [13] translate(''1t)'',ttr default 'ipsa' [14] fn default to but could be of [15] (fn default '') downloadfiletoPC tn 0 8=} cmded a;io;b;c;d;e;file;f;n;p;stop;S [1] DANB 92 EDITS OBJECTS IN THE CURRENT FILE [2] /file=FILE WILL ACT ON DIFFERENT FILE [3] : addr nc edit ohl [4] io1 a1'/file= /stop' parse a S'A'165av [5] (stoparg)/arg(arg' ,+') 1 [9] dates:trap'19 e E1nn,0231 e untie nums~tiedlc' [10] (0cd)mod (^/n~cd'/- ')d10 cdn\n/cd [11] d10:tY2K>1n 0 100 100 100fi cd n[1]n[1]+tY2K+10060>1001n [12] cdtstofl n n0t1result [13] 'nn,cd<12rdfi tfopen result[i;]' fori t [14] (0resultnresult)end [15] mod:(0md)end (^/n~md'/- ')m10 mdn\n/md [16] m10:tY2K>1n 0 100 100 100fi md n[1]n[1]+tY2K+10060>1001n [17] mdtstofl n n0t1result [18] 'nn,md<78rdfi tfopen result[i;]' fori t [19] (0resultnresult)end [20] other constraints here [21] end:E>,<'** Some files could not be checked for dates' [22] nofit0 resultfit result[avresult;] =ʀBf cmdfns str;nofit [1] RETURN ALL FUNCTIONS CONTAINING PATTERN str [2] str1'/= /nofit' parse str [3] resultwsnl 3 (str^.=' ')l10 [4] resultstr manymatch result [5] l10:nofit0 [6] resultfit result =M cmdfori EXP;io;i;i;n;F [1] Execute expression FOR I:=limits[2] [by count] [2] io''globals [3] i\<\EXP SS '/i=' ER(~/i)/'/I= must be present' [4] i3i/EXP EXP(~i)/EXP [5] (2 3 =n,i)/2,3 nio,n-~io [6] 2:nn,1 [7] 3:((1n)=-/2n)0 i''Ң1n [8] i18,EXP EXPiEXP [9] ifx(3,i)(i'F'),EXP,i'',(i<0)'1n-ii+i' [10] i''n n11n F [11] DANB 92/11/27 WILL exp FOR I:=N[1](OR IO) TO N[2] ead=1 44 cmd cmdfrdci arg;DR;Ityp;axs;cmp;dispfmt;e;j;lp;m;pe;q;s;stop;t;tn;type;who;er;ps;trap;empty;end;lock;skip;start [1] DanB 940810 from MF - display RDCI for each file cpt [2] q'/empty /lock= /skip= /start= /end= /= ' parse arg [3] lockfilock tnfi q ((1=j)^1jvi q)l1 [4] (iferrin 'tnlock fopen q')l1 [5] out '*** Unable to open that file' 0 [6] l1:ssize tn,lock [7] start & end may have a sign meaning +start or -end [8] stops[2]-1 (0mend)l3 t4>q'+-'1m m(2q)+1fi tm [9] stopstop(m1*q)+t1q2s t:signed; m:number; q:odd=-,even=+ [10] l3:js[1] (0mstart)l4 t4>q'+-'1m m(2q)+1fi tm [11] jj(m1*q)+t1q2s t:signed; m:number; q:odd=-,even=+ [12] l4:'sapl.type' bind 'Ityp' define intrinsic fn [13] fx>'rDR c''r''PBIFJCE?''[111 111 112 113 117 124 236103 Ityp c]' [14] axs1 assume we have access [15] m'* unavailable *' trap'19 c l5' ps 1 1 0 1 trdfi tn [16] mtimefmt, 0 1 q 1 1 0 1 t mm,' by_3555555'tai[1]tq[;,1] [17] l5:m(1<'/Created : /Last access : /Last changed: '),><1 m [18] q('File name:',2names[nums''tn;])'size='s [19] out q,mtrap'' [20] (j>stop)empty [21] /skip tells how many cpts to skip at a time [22] if % then consider it a portion of the range [23] (q'%'skip)l6 skipskip~'%' [24] l6:skip(~q)+skip default 0 [25] ql7 skip1(--/2s)skip100 [26] l7:s3s[2] size of cpt field [27] dispfmt'i',(s),',3a1,bi8,2bi9' e0 last Empty? [28] out((s-3)''),'Cmp T Size Who When Shape' [29] loop:cmpread tn,j,lockpee e0 [30] ('P'typeDR cmp)l10qpnames cmp [31] (eempty<0qcmp)skip [32] l10:m20'* NO access *' s 0 0 trap'19 e axs0lc' [33] axsl20 m,timefmt 2srdci tn,j,lock [34] [35] l20:out(,dispfmt fmt(j(1pe':')' 'type1 2s)),' ',m,' ',q [36] skip:(stop>S AR cmdfread arg;cpt;n;tie;keeptied [1] DanB 20020924 Read from file specific component [2] Use when file is not tied and only one component needs to be read [3] arg'/= /keeptied' parse arg use ' ' as delimiter [4] n1n/n' '=arg (vi cptnarg)er2 cptfi cpt [5] (iferrin 'tiefopen narg')er1 [6] tiedtied,keeptied/tie [7] (iferrin 'resultread tie,cpt')er3 [8] 0 [9] er1:out 1')*** Unable to tie the file (',errmsg 0 [10] er2:out '*** Invalid component number' 0 [11] er3:out '*** Error: ',errmsg 0 =ʚXXe cmdglobals xN;io;xBR;xDel;xDF;xFS;xL;xML;xNL;xR;xST;pw;fmt;full;fun;upd;var [1] dANb 840920 GLOBALS REFERRED TO BY xN [2] /full ALSO PERFORMS A RECURSIVE SEARCH ON ALL CALLED FUNCTIONS [3] /fmt WILL FORMAT THE RESULT [4] /upd WILL WRITE THE RESULT IN THE FUNCTION [5] /fun RETURNS THE NAME OF VISIBLE funcTIONS THAT ARE CALLED [6] /var RETURNS THE NAME OF VARIABLES OR UNKNOWNS USED [7] bY DEFAULT BOTH /fun AND /var ARE SET TO 1 IF NONE IS SET [8] : xMV xC1 xCOMPARE xEQ xFr xFT xGENSYMB xQZ xRD xTREEGEN fit [9] 960809 modified for all ws usage [10] io1 xL1'/fmt /full /fun /upd /var' parse xN [11] fmtfmtupd update implies format [12] xRfun=var (upd^~xR)xl5 [13] 'Update only one of function/variable will destroy previous' [14] 'comments in functions. Continue? ' ('yY'.=1)0 [15] xl5:funfunxR varvarxR [16] (' 'xDel1xL)xl10 xL,allfns,xDel'/' [17] xL may contain multiple names [18] xl10:xNxL[ɢ1+xLxDel] xL(1+xN)xL [19] xML1+9999full [20] xNL(funvar)/'(3','='[1+var],'nc xL)xL' [21] xST'xNLxNL xC1 ',xNL,'0 1(xR[;2]>.='''')xR' [22] xBRxNL 0 0 xFS1 FULL SEARCH [23] xSTfx((xST)'xL xDF xR'),[0.1] xST [24] xST(1,xST)xST'',xN [25] xTREEGEN xN [26] xRxRD xNL [27] fmtxl99 pw75 xRxR[avxR;] [28] xNL(' '.xNL)/xNL(xBR3=nc xR)xR [29] xSTfun'Required subroutines:' over 1pw fit xNL [30] xNL(' '.xNL)/xNL(~xBR)xR [31] xSTxR' ',xST over var'Global variables:' over 1pw fit xNL [32] updxl99 update implies format [33] xNL(xNL[;2].'>')xNLcr xN xST1++/^\''=1xNL[;1] [34] xRfx xNL[xST;] over('','>',xR) over(xST,0)xNL [35] we only return the last value in this version [36] xl99:resultxN xC1 xR (0xL)0 out '> ',xN out xR xl10 =] cmdhex n;io;hn;i;x;back;char [1] dANb 93 hexadecimal of n (integer OR charACTER) [2] r(n)4. wORKS backWARDS USING /back [3] io0 x'0123456789abcdef' [4] (''1n1'/= /char /back' parse n)/5 n1n [5] 5:back/30 char/10 nfi n 20 [6] 10:navɢ1n [7] 20:result,' ',x[(416)n] 0 [8] 30:hn0 wORKING backWARDS, n IS HEX [9] 40:(n^.=' ')/50 hnhn,16x(in' ')n n(i+1)n 40 [10] 50:resulthn char0 resultav[hn] =]]pty cmdhistory N;C;H;S;T;V;version [1] dANb 850708 UPDATE HISTORICAL INFORMATION. [2] iF N>version THEN IT IS NEWER VER NO. OTHERWISE IT IS INCREMENT. [3] iF 0 USE CURRENT NO. [4] S'/= /version=' parse N Nversion default 0 [5] V'VERSION' H'HISTORY' VAR NAMES [6] (0nc V)/V,'1' CV cURRENT vN [7] (N0)/'CN',(C>N)/'+C' ADJUSTED [8] (nc H)l1 T 1 30 30'VERSION DATE DESCRIPTION' H,'T' [9] l1:T(5 2 7 0 C,1001003ts),S V,'C' [10] N(T)1VH V((1V),N)V TNT [11] H,'VT' [12] out 'COMMENTED VERSION ',C ]=xZZum[z cmdinputxt var;i;cr;in;new [1] danb 1993 inputxt into variable [2] (new0=inc var)l10 ER(2i)/'invalid name' [3] var,' CONTAINS ',(var),' CHARACTERS' [4] l10:in0'end input by space,cr' crCR [5] ((0i)^' '^.=i)/end inin,i,cr lc [6] end:in1in drop last cr [7] var,'',((~new)/var,','),'in' =P&& cmdkeepfnsof fn;all;o [1] dANb 941026 kEEP ALL THE FNS RELATED TO fn [2] (fn^.=' ')1 fnlx [3] 1:ER(3nc fn)/'invalid function: ',fn(+/^\' '=fn)fn [4] ofn over u 'globals ',fn,'/full' [5] (+/ex(0=o matiota all)allnl 2 3),' OBJECTS ERASED' [6] =l<( cmdlockedfns arg [1] dANb 92 fIND ALL LOCKED FNS IN WS [2] result(0šҡ1fdarg)argnl 3 [3] result(,2'''),(0cr''',1 arg)argnl 3 =^y>( cmdlog arg;tie;ts;keywords [1] activity log - lOG arg TO LOG FILE [2] tiefopen 'monitor' arg1'/= /keywords=' parse arg [3] keywordskeywords default 'activity' [4] out 'Entry ',(((2 ws 1)arg) appendr tie),' filed.' =1  rc rcmdmonitor Arg;io;pp;ps;trap;accnos;apply;b;ci;cpt;c;date;debug;d;file;f;id;max;nows;ns;nu;nw;pass;pw;string;s;tie;t;user;u;wait;ws;w;yt;out; [1] Read monitor file from n1 to n2 components. daysin timen stie [2] n1 : read first n1 (or last if <0) components [3] n1 n2 : start/end limits [4] [5] /apply= fn to apply each cpt read [6] /date : arg are dates. 'Y' and 'T' can be used for yesterday & today [7] /file = allows to change the file to be read [8] /nows : no ws info exists [9] [10] /pass = allows to supply a passnumber to the monitor file [11] [12] Filters may be specified for string, user AND workspace: [13] /ws = use string to search in workspace [14] /strin= use string to search in text [15] /user = allows to select components written by user [16] /wait : will enter wait loop and display msgs as they are logged [17] [18] If exclusion is desired use '~' BEFORE the value (as in /ws=~XYZ) [19] [20] '' io1 ps 1 1 0 0 pp10 [21] s'/= /apply=/date/file=/nows/string=/user=/wait[=]/ws=/debug/pass=' [22] Args parse Arg [23] sdebug/l100,next (113=av'')s10 scmdmonitors s20 [24] s10:ss stop 'cmdmonitor' non SAM [25] s20: [26] OUTput fn [27] t3 fd 'out c',CR,((~0apply)/apply),' c' [28] fn. Can be used with /apply [29] t3 fd 'rn max a',CR,'r(n1r)ra' [30] tt<1t' '=d' ',Arg where args begin [31] yt0.5'tTyY't/d are surrogates used for dates? [32] wsws default '' useruser default '' datedate/ 1 2 yt [33] nw'~'ws wsws~'~' nu'~'user userfi user~'~' [34] ns'~'1stringstring default '' stringnsstring [35] ffile default(1ai),' monitor' [36] the account numbers known [37] pwpass default 0 accnos,>IDs[;1] IDsIDs[;2],<'' [38] determine component limits; tie [default] filename; try pw of 0 once [39] sc 0 1 +2sizepw,tiepw fopen f [40] 'File <',f,'> tied to ',(tie),'. Component range is ',c [41] w0/s)/l130 w'?' (nows''cpt cpt1cpt (nw/wsw)l70 [52] l50:u9,>IDs[accnosid11cirdci tie,c,pw] [53] keep if user not specified (0) or (~) in id [54] (0user)/l55 (nuiduser)l70 [55] l55:(string)l60 (ns1stringcpt)l70 [56] l60:'Entry ',(c),',',u,' (',(id),') ',w,' ',,6,timen 2ci [57] out cpt '' [58] l70:next,ss+ 1 0 [59] [60] ARGUMENTS ARE DATES [61] [62] l80:d2460*3 (/wyt 2 1)l85 1/60th secs in one day [63] Arg[b/byt1]dt21975+daysin 1003ts today's date [64] Arg[b/byt2]dt- 2 3 1[5 6 7t] yesterday's [65] l85:(f(~w)/w)l90cs transform dates into sec/60th [66] time used in universal. We bump 2nd date by 1 to act like cpts nos [67] Arg[f]d21975+(f2)+daysin t+10000ts[1]1300>tArg[f] [68] [69] perform binary search on start date [70] l90:(1-/c)/l100 c[1+Arg[1]<2rdci tie,f,pw]f0.5+/c l90 [71] l100:csArg[1]1c (2=Arg)/l110 sArg,1s next [72] perform binary search on end date [73] l110:(1-/c)/l120 c[1+Arg[2]<2rdci tie,f,pw]f0.5+/c l110 [74] l120:Arg[2]1c next,sArg [75] [76] EOF reached. Should we wait? [77] l130:s(1s),(size tie,pw)[2]-1 [78] waitbye trap'1000 c end' next,dl wait [79] [80] end:CR,'*** monitor ended ***' [81] bye:untie tie =d) cmdnames pat;io;del;names;n;pat;tie;file;nosymb [1] ]unames with better pattern [2] io1 del1pat'/nosymb /file=' parse pat [3] /nosymb removes the symbol [4] (file0)l10 fileufiles[1;] [5] l10:tiefopen file result0namesread tie,(read tie,2)[2] [6] l20:(pat)l30 pat1pat n1+patdel [7] resultresult(npat) patmatch names [8] patnpat l20 [9] l30:nosymbl40 l40 [10] l40:resultfit(result)result [58u=ʘ2' cmdnoclash name;io;b;loc;l;n;stem;t; [1] dANb 92 - cHANGE ALL LOCAL NAMES IN name TO 0, 1, 2,... [2] name'/n= /stem= /= ' parse name [3] n1000n default io''globals [4] stemstem default '' [5] locu 'objects ',name [6] KEEP ONLY LABEL OR NON-SYS LOCAL [7] loc 0 1 ((loc[;io]'lL')loc[;2]>.='')loc [8] REMOVE ~ NAMES IF ANY [9] t2' ',' ',(l/b(t)(,t) SS '~')tcr name blb [10] tmatrify(,0,0,\b)/,t loc(0=t matiota loc)loc [11] (1loc)0 name,': no change to perform' 0 [12] 0:n('<',stem,'>,li5') fmt n+(1loc)-io [13] u 'osr ',(,loc,' ',n),'/x=tc/a/l/ri/o=',name =ʀBf cmdobjects a;fmt;sort [1] dANb 92 - RETURN ALL OBJECTS USED BY fn [2] a'/fmt /sort /= ' parse a [3] resultxFr 1 fd a [4] sort1 resultresult[avresult;] [5] 1:fmt0 [6] resultxFT result =p cmdohl fN [1] oRDER hEADER lOCALS [2] (' '^.=fN)10 fNallfns 20 [3] 10:fN' ' matrify fN [4] 20:ohl fN[io;] (0fN 1 0 fN)20 =l cmdosr cmdosr;OSSPATMATCH;cmdla [1] DANB - oBJECT sEARCH rEPLACE - VER 4.5. NOW RELIES ENTIRELY ON osr [2] resultcmdla osr os cmdosr =8t [3 cmdoss aRg;pkgmatch;cmdla [1] dANb - oBJECT sEARCH sTRING - vERSION 4.6. nOW RELIES ON oss [2] resultcmdla oss os aRg cmdla refined in os = '** cmdpackages LiSt [1] DanB 970713 return list of packages in names [2] (4nc LiSt)Ll1 LiStLiSt,(' '^.=LiSt)/'nl 2' [3] Ll1:LiSt(2=nc LiSt)LiSt [4] LiSt(0=svo LiSt)LiSt prevent hangups [5] LiSt(,1'),(2=pnames ',1 LiSt)LiSt [6] (0LiSt)0 '(None)' =@ rcmdprtlines startend;io;acc;block;ch;cr;ctl;curl;dat;dflt;file;hsp;lines;lpp;specs;start;tie;width;file;for;paper;remo;title [1] extract lines from session log and send to a printer [2] startend start and [end] (inclusive) line numbers to be extracted [3] specs: /remo=(def sa0120) /for=(default account) /file to file only [4] e.g. ]prtlines /for=danb print all pages [5] ]prtlines 100 500 /remo=rtor print lines 100 to 500 [6] rio1 (2runs[1;3])l10 [7] 'use with IDSH only' 0 [8] default limits to 1 9999 [9] l10:startend'/= /remo= /file[=] /for= /paper= /title=' parsestartend [10] 1 pos Number= 1 to N, 1 neg N= N to end [11] chstartend21,fi startend (0<1ch)l15 startendch[2],999999 [12] l15:accai[1]chav[256]crav[157] [13] lpp66width80 startend per page maximum width [14] block100 number of lines [15] dfltfor default 1cr,'*** user ',acc [16] remoremo default 'opns' [17] ('p'paper1paper default 'portrait')l20 [18] lpp45width132 [19] l20:specs'erase,remo(',remo,'),do1,s',paper,'01,pn2',dflt [20] 1 svc 'ctl'6 svo 'ctl'svn ''runs [21] let's find what's the last line [22] datctlctl(0'line'),(0'line c'),(0'line') [23] (0er>''dat)/lEr1 [24] ctlctl0'line ',2>(>(>dat[2])[2])[1] THAT's the current line [25] (0er>''curl>dat[4])/lEr1 [26] curl(vi curl)/fi curl2>(>curl[2])[1] THAT's the last line [27] start1startend(999999,curl)2startend,curl [28] signal(/startend)/11 domain error [29] (010filefile)cre [30] file 0 7 (file[;7]^.='tempprt')file 0 11 lib acc [31] 'Output file: ',file'tempprt',(^/('li4' fmt1+1file).file)1 [32] cre:file create tie1+/0,nums [33] (10000+80-/startend) resize tie [34] dflt append tie [35] (0title)l30 [36] title append tie [37] l30: [38] lLpS:linesstart,(1startend)block+start [39] datctlctl0'get ',lines [40] (0er>''dat)/eras [41] (0er>''dat>dat[2])/eras [42] dat1>cr,>2ա>dat>dat[2] [43] dat append tie [44] ((1startend)>start1+1lines)/lLpS [45] lLpE:(0file)lEnd erfx(1+lEnd,0)cr 'cmdprtlines' [46] tie hsp specs lEnd 1 1 0 pfile tie [47] eras:file erase tie 0 [48] lEr1:'Unable to retrieve lines from session log' [49] lEnd: [50] za hsp b;ec;fn;hsp [51] (fn(names^.=' 99 hspsystem ')/nums)l0 [52] '99 hspsystem' stie fn((fn)fn0,nums)0 [53] l0:signal(0=10zfx read fn,5)15 z z =ald)/1 cmdrenum name;io;b;i;loc;l;n;stem;t;x; [1] DANB 92 - cHANGE ALL LABELS IN name TO BE IN ASCENDING ORDER [2] CHANGE THEM ALL TO 1, 2, 3, ... [3] io''globals name1'/n= /x= /stem= /= ' parse name [4] SWITCH /n= ALLOWS TO START,INCREMENT, DEFAULT io,1 [5] iio,1 (0n)/0 ii2fi n [6] 0:ni [7] sWITCH /stem= ALLOWS TO CHANGE LABEL sTEM. dEFAULT [8] (0stem)1 stem'' [9] 1:stemstem~' ' [10] locu 'objects ',name [11] KEEP ONLY LABEL OR NON-SYS LOCAL [12] loc 0 1 (loc[;io]'lL')loc [13] REMOVE ~ NAMES IF ANY [14] t2' ',' ',(l/b(t)(,t) SS '~')tcr name blb [15] i'' (x0)2 ix,' ' [16] 2:tmatrify i,(,0,0,\b)/,t loc(0=t matiota loc)loc [17] (l1loc)3 out name,': no change to perform' 0 [18] 3:t'li6' fmt n[io]+n[1+io]-io-l stem(l,stem)stem [19] name osr '/tcalr',(,'/',loc,'/',stem,t)~' ' =r=', cmdsecurews x;cmdsecurews [1] DanB 1998 secure workspace by changing all references to damaging [2] file ops to inoffensive equivalent. bounce et al also affected. [3] (0xu 'lockedfns')l10 '*** WARNING: locked fns! ***' [4] l10: [5] x'//repl/Repl/app/App/bounce/Bounce/drop/Drop/cre/Cre' [6] xx,'/rena/Rena/stac/Stac/lsta/Lsta/runs/runs/run/Run' [7] osr x =ʰ11F cmdshow obj;io;pp;del;d;n;r;s;t;uf;R;data;file [1] DanB 92 show objects on file [2] R'' gather results. /data returns extra data (only if /data=o) [3] dpp16 io1 del1obj1'/data[]o /file=' parse obj [4] (0file)l0 fileufiles DEFINED IN ucmd [5] l0:uffile'*'(21,file)file [6] TRY ufiles SPECIFIED OR all OF THEM BY DEFAULT [7] l1:t'' (0uf 1 0 uf)/no n(1+objdel)obj [8] (02r(fopen uf[1;]) objdata n)/l1 (data0)l5 [9] d' cpt ',r[2],,(r[3 4]0)100 0 1 ftimerep 2r [10] tn,' found in ',uf[1;],d,CR ('o'data)next [11] l5:s'**package**' (2pnames dread 2r)l6 s1,CR,d [12] l6:tt,s next [13] no:t'** "',n,'" not found' [14] next:RR,' OR WHATEVER MARKING SYSTEM MAY BE DESIRED [14] (0comment)l4 comment'' [15] l4:commentmark,when,who,' ',comment [16] l5:(' '^.=arg)/exit iarg' ' fniarg argiarg [17] (0crcr fn)l7 [18] l5,' IS LOCKED OR SHADOWED' [19] THIS LINE TO BE COMMENTED OUT IF REMOVAL OF PREVIOUS mark UNDESIRABLE [20] l7:cr(-2rep^mark,(1,mark)cr)cr [21] l5,':',3 fd cr over comment [22] exit: [23] 15 mAY 1993 BY dANb THIS tag LINE WRITTEN BY THE tag COMMAND ! =ʸArg[ cmdtimefmt ts;trap [1] DanB 94 convert packed time argument to formatted ts format [2] right argument: rdci-type timestamp(s) of any shape [3] trap'c er 0' [4] (ts^.=' ')l10 [5] 'Argument cannot be empty' 0 [6] l10: [7] resulttimefmtts = cmdtref ls;io;cLaSs;nAm;sYm;b;f;i;l;main;noapl;n;recur;sort [1] dANb 940830 cONTRUCT A TABLE OF REFERENCES BY ls (FNS) [2] ls1'/main[=]names /noapl /sort /recur /=' parse ls [3] sYmcLaSs 0 0 '' io1 (ls)l2 [4] lswsnl 3 get only fns outside of ucmds [5] l2:l1lsremshadowed matrify ls lsls~>,* Unable to tie file <',file 0 [9] l7:out 1'>* Checking file <',file [10] tread tie,2 [11] names(0 6 b)bread tie,t[2] [12] numsread tie,t[3] nnums[inums[;2];] [13] numsn namesnames[i;] [14] l10: check the table data [15] (0fx>,<'f',,';',names)l20 [16] out '*** Names table contains invalid names' [17] l20:(ttnums[;2])l30 [18] out '*** Numeric table contains float numbers in 1st 2 columns' [19] l30:(^/nums[;1] 2 3 5)l40 [20] out '*** Numeric table contains invalid type in column 1' [21] l40:(^//nums[;2].<2size tie)l50 [22] out '*** Numeric table contains invalid cpt# in column 2' [23] [24] check the packages [25] l50:pnames[;3]^.='pkg'ex 'f' recoup 'f' [26] (/f~b2=p/nums[;1])l60 [27] out '* The following packages are not classified as variables:' [28] out fit fpnames [29] l60:t0nb/p/nums[;2] [30] 'tt,2>pnames read tie,n[i]' forin [31] (/t)l70 [32] out '** The following variables are not packages:' out fit tbpnames [33] l70: [34] find the functions [35] fns(pnums[;1]=3)names np/p 'p' is where fns [36] try to define them locally [37] b0fx>'rn rel r;rel''fx>(''rel;'',n)''r0103fd r''' [38] 'bb,fns[i;] rel read tie,nums[n[i];2]' forin [39] (/b)l80 [40] out '*** These functions could not be fixed:' out fit bfns [41] l80:i~bnames[;6].'pkgcmd'ex 'rel' get rid of local fn [42] n0=fnames matiota n((-n+/t=' ')t),((1t 0 6 inames),4)'doc' [43] (/n)l85 [44] out '* No doc for packaged commands' out fit nt [45] l85:b[(~n)/f]0 [46] cmd0t(,'/',allbnames)~' ' look for all names [47] (/p)l90 any fn to look at? [48] [49] search the file (starting at cpt 11) for all the names [50] rel0<(tie,11) oss '/lrcta;q',t syntactic, not local, no banner [51] keep only data related to functions (calls to self already excluded) [52] i1relrel[10+b/nums[;2];] 'rel' is square. [53] remove "calls" from variables [54] rel[(3b/nums[;1])/i;]0 [55] all the commands are roots [56] cmd(ball[;3]^.='cmd')/i [57] relreli= 1 0 b\cmd [58] all 'grp' are deemed used by their commands [59] nall matiota 'grp',1 all[cmd;] [60] rel[cmd;]rel[cmd;]n.=i [61] all 'doc' are deemed used by their commands [62] t-n+/' '=all[cmd;] [63] nall matiota 0 3 n(tall[cmd;]),1 'doc' [64] rel[cmd;]rel[cmd;]n.=i [65] trel ('debug'sp)look 'unused'(~t)all [66] look:bt (btt.^rel)look find unused descendants [67] (^/t)l90 [68] out '* These objects are not referenced anywhere:' fit(~t)all [69] l90: [70] check the 'grp' variables, they should contains all the names [71] of the used objects [72] i0 [73] chkgrp:((cmd) command <',n [80] check doc for that command [81] (0/b)chk20 1 grp and only self as call then: [87] out '**',f,' has no group and uses' out fit calls [88] chkgrp [89] grp exists - chk against calls [90] chk20:b(' ',CR) matrify read tie,nums[t;2] fetch the list [91] t(0=('cmd',n) matiota b)b remove cmd name [92] (/b0=t matiota calls)chk30 [93] out '** These objects are used and not in group of',f out fit bcalls [94] chk30:t(0 3 t)t t(t[;3].'pkg')t remove packages references [95] (/b0=calls matiota t)chkgrp [96] out '* These objects are not used and are in group of',f out fit bt [97] chkgrp [98] echkgrp: [99] out '* End of verification' = w cmdvars str;nofit [1] RETURN ALL VARIABLES CONTAINING PATTERN str [2] str1'/= /nofit' parse str [3] resultwsnl 2 (str^.=' ')l10 [4] resultstr manymatch result [5] l10:nofit0 [6] resultfit result = cm cmdversion arg;io;cpt1;p;tie;ver;file;set [1] DanB 20011002 determine user command version or set it [2] io1 tiet 't' is a global holding the current ucmd file [3] argfi '/= /set /file=' parse arg [4] 'invalid version number' signal(setarg)11 [5] (file0)l10 [6] file specified, tie it [7] tiefopen file [8] l10:file1'><',1(p1pver=' ')/ver,names[numstie;] [9] resultfile,': ',cpt1read tie,1 [10] set0 [11] ver1fi(p7+('Version'cpt1)1)cpt1~',' [12] 'invalid version number' signal(arg>ver)11 [13] resultfile,' was ',pcpt1 [14] cpt1(pcpt1),(arg),', created ',6ts [15] cpt1 replace tie,1 =x cmdwhois x;l [1] find name of x; IDs is global [2] lIDs[;1+io],<'** unknown **' [3] result>l[IDs[;io]<''fi x] (5=hemman cmdwsdrop arg;io;b;gl;i;last;lib;no;n;r;s;t;CMD1;R;noconfirm [1] )wsdrop pattern [2] 'arg' may be preceeded by an account number[:password] [3] io1 arg'/= /noconfirm' parse arg [4] 'pattern needed' signal(arg^.=' ')11 [5] find if there is an account number in the front: [6] nlib(1+arg' ')arg (^/b^\':'lib)10 nb/lib n: lib no [7] public libs are not to be signed on to [8] 10:lib(gl1vi n)/lib arg(lib)arg [9] STASKMODE'gather' [10] we signon to the other account if the account is >1000 or our account [11] signon,>1(x9991fi n)libai[io] [12] libstsend ')lib ',nogl/n [13] R 0 0 '' ('improper lib'lib)/100 [14] lib[b/blibCR]' ' libRmatrify lib [15] (0Rarg manymatch lib)0result'No ws to drop' [16] last1RR[avR;] i0 result'' noconfirm80 [17] 'Drop these workspaces?' fit R (/'yY'1)80 [18] result'Not done.' 0 [19] 80:(lastii+1)100 drop prompt from result [20] resultresult,R[i;],6stsend ')drop ',R[i;] [21] 80 [22] 100:CMD1av[4io],')off' [23] under SAM we wait for the signoff msg [24] (113av'')0 CMD1 p=1   cmd cmdwslib arg;io;ps;trap;b;gl;i;last;lib;n;no;r;s;show;w;CMD1;Del;Macc;R;SAM;STASKMODE;date;debug;er;lx;nofit;obj;public;sort;string [1] )wslib N with pattern [2] 'arg' may be preceded by an account number[:password] [3] /date will report the date, /lx its lx, /er its er[1;] [4] /sort will sort by =date, descending if (ex:/sort=date) [5] /nofit does not format result within pw [6] /obj= will look only in ws with any of those objects [7] /string= will look in ws with that string [8] If it starts with the output will be also displayed [9] /public will search public libraries [10] io1 [11] arg1'/= /date/debug/er/lx/nofit/obj=/public/sort=/string=' parse arg [12] [13] /public implies there is no lib # before the patterns [14] ps1 SAM113=av'' public2 [15] lib>(InternLibslib[2] [17] 12:nn matiota arg manymatch n [18] RR[n;] sort no other feature available w/ pub libs xcep /nofit [19] [20] find if there is an account number in the front: [21] 2:nlib(1+arg' ')arg (^/b^\':'lib)10 nb/lib n: lib no [22] public libs are not to be signed on to [23] 10:lib(gl1vi n)/lib arg(lib)arg any pattern AFTER the libno? [24] STASKMODE'gather' [25] we signon to the other account if the account is >1000 or our account [26] debug>,1(9991fi n)libai[io] [27] Rdebug/30,40,20,19 SAM18 scmdwslibR 19 [28] 18:R'R stop''cmdwslib''' syntax error on SAM [29] 19:debug>,objstring)60blast~i0 [38] r[2]30 prepare the string for [39] [40] uses a delimiter between strings to look for - we use '\' [41] See ' doc for details on how to use it. [42] r(2show)string Del'\' default delimiter; ensure result [43] r'+/,(nl 2 3)oss',1'''''',1'd',1((Del1r)/2Del),r [44] we send the statement to look for the string and return if it was [45] found (+/...) PLUS a statement to display the strings found IF [46] was specified before the string [47] debug>,,,? [66] 40:(0string)30 [67] b[i]'1'1rstsend string [68] (showdebug)>,<(n~CR,' ')/5w,n1r [69] 30 [70] [71] check if lx, er or date wanted [72] 60:RbR (erlxdate)sort s'saved''vered' [73] gli1 (last1R)100 [74] preset those sys vars in case they're undefined (SAM) [75] 70:rstsend 'lx''*** No LX ***''er''*** No ER ***''' [76] get the ws date and sys vars [77] r5stsend ')copy ',no,' ',R[i;],' lx er' get date in 'saved' msg [78] glgl,av[1],date/(4+(s>W1W [6] (0=10F)10 ((1F3,F)nums)110 [7] ((11F)>.2size 1 0 1 /F)120 fN,read F 40 [8] 10:(F^.=' ')20 F(F[;1]'')Fnl 3 [9] 20:F1(A1AF' ')/F,' ',F [10] 30:(F)0 '' fN(1+F' ')F [11] (3nc fN)130 (A1 fd fN)140 AfNA [12] [13] find fn name & display syntax [14] 40:fN(fN'')fN fN(-AA(32fN)' ',cR)fN [15] lN1+fNcR ' ',(B1+/(lNfN)';')fN [16] [17] remove fn name in header [18] ABfN fNBfN C(''A)A'' D'',CA result [19] DD,((+\B) 1 1 2[+/BB>1BC' '])/C' ',CA [20] D contains the header w/o fn or locals. fN contains the reset. [21] A'',D BA' '[1+(+/A' ')+3''A] where to drop [22] fN(BA),(lNĢ1+B+/(BA)'; ')fN [23] fND,fN,'' there may be spaces and a comment in the header [24] (C+/BfN'')50 A(C+C+fN)1 [25] A[, 2 0 .+(B/B)+2C]0 fNA\fN expand and [26] 50:lN(fNcR)^(fN)1fN'[' (/AfN'''')60 [27] account for text [28] A~A\AlN\D(-D)٢1DlN/\A fNA/fN lNA/lN [29] 60:(/AfN'')70 BAlN A~\B\A(-A)٢1AB/A [30] fNA/fN account for comments [31] lNA/lN [32] 70:BB(-B)٢1BfN1 start/end of tokens [33] (/BB\D(-D)٢1D(B/fN)1բ10)150 [34] AB^D\B lN(AlN)/A lNlN/lN lNlN-lN [35] AD/B A(A/A),1+A A/C(1A)-1A [36] A((C),A)(,C.A)\D/fN [37] C2'[:'.=(B>D)/fN [38] BA fN'' AA[B;] [39] D~^/A=(-A) 1 0 A ADA [40] lNlN[B] [41] CC[B] [42] A(0 4 + 0 11 A)A [43] D1D [44] 80:BD1 fN('i4' fmt BlN),' :?I'[1+BC] [45] fN1(E(-E)٢1EfN' ')/fN,fN,' ' [46] fNA[1;],fN (WfN)100 [47] 90:EW+1-((W+1)fN)' ' EfN [48] (W IS AN INVALID NAME OR NOT A FUNCTION AT THIS LEVEL' 150 [53] 140:'<',fN,'> IS A LOCKED FUNCTION.' [54] 150:F(F' ')F 30 [55] dANb 1992/05/05 20:55 =ʨ  ' Compare 2 workspaces or files DanB 1992 Syntax: ]compare [WS1] WS2 /ws /object=[]FN /load /nlines=N /zone=Z /show=S this command will provide useful information about the differences between 2 files or workspaces. *** note: destroys contents of active workspace !!! if ws1 is omitted then the active workspace is used to compare. /ws means argument specifies workspaces, not files /object=OBJ will compare only that function in the workspaces specified /load will use )load instead of )xload to bring the ws(s) in other switches: see below. the format of compare is as follows: the function on the left is assumed to be the one which has changed. the fn on the right is assumed to be the replacing fn. the output is based on these assumptions. each line of the fn on the left is preceded by its line number [xx]. where the line has been deleted a symbol appears '-' before the linenumber. where a new line has been inserted there is no line numbering and '+' appears. example: fna fnb [1] same line [1] same line [2] fna line 2 [2] fnb line 2 [3] same line 3 [3] same line 3 [4] comment deleted [4] new common line [5] new common line [5] new comment the output will look like this: -[0] fna + fnb [1] same line -[2] fna line 2 + fnb line 2 [3] same line 3 -[4] comment deleted [5] new common line + new comment note that in order to avoid lenghty output of big functions with little difference only sections of the function are shown, those where the changes occured plus a certain no of lines before and after. pw is used to delimit output output specifications /show=N1 N2 N3 (N) specifies the output format for each of the different sections: the unique objects in ws1, the unique objects in ws2 and the common objects in both ws. if NX=1 only the names are displayed, if NX=2 only their contents (or difference) is shown, if NX=3 both are shown. /zone=N will display so many lines before and after each different line /nlines=N will display the first N lines of each variable displayed those 3 switches also apply to the command ]compfile NOTE: this assumes that the 'compare' workspace exists in the same library as the file containing this user command.ommand.mand. =ʐmbbcjcCompare function in WS with the same one on file DanB 92 Syntax: ]COMPFN [>]object /FILE=ucmdfile /REP=var Will compare the objects with the one on a UCMD file. If a '>' precedes the name then all objects named in its group (ex. grpobject) are compared. If there is no source /REP may specify the source as in /rep=myvar (only good for 1 object).dd=Compare 2 character matrices DanB 84 Syntax: ]COMPMAT MAT1 MAT2 Compare 2 character matrices. See ]COMPARE command for details of comparison procedure.h=HQg Compare two User Command files DanB 93 Syntax: ]COMPUFILE UfileA UfileB Modified from APL*PLUS library. Compare the contents of the 2 files filesH=ʐmbbcjc ndaysdaysin ts;n;io;M;r [1] danb 83/9/14 no of days since 1900/1/1. rank 0 fn [2] rts ts 1900 100 100 ,ts [3] ndays365nts[io1;] [4] account for all leap years [5] ndaysndays+(n-1)4 [6] M 0 31 59 90 120 151 181 212 243 273 304 334 [7] ndaysndays+M[121ts[2;]]+(0=4ts[1;])^2, & = 99 del er;lx;trap;del [1] from '7 del'@ipsa [2] trap' 0 c signal 4er' (0=nc '99')/'99''''' del(99,' ')[io],01er (del(names^.=' 7 del ')/nums)l0 '7 del' stie del((50)0,nums)0 [3] l0:99('Tn' pack del) pins('Rc' pack 0) pins('Buf' pack 99) pins('Name' pack er) pins 'Qio' pack io pdef read del,6 er'' [4] l1:trap' 0 c ',l3 lx'',l4 (0=10'Name' pval 99)l2 9999 pins 'Typ' pack,4 9999 pins('Typ' pack,2) pins 'Rnp' pack read 'Name' pval 99 l3 [5] l2:9999 pins 'Typ' pack nc 'Name' pval 99 9999 pins 'Rnp' pack1((3='Typ' pval 99)/'''1 fd'''),' ',((4='Typ' pval 99)av),'Name' pval 99 [6] l3:del ('Rc' pval 99)l1,0,l6,l8,l9,l12,l11,l14,l15,l5 [7] l4:9999 pins 'Rc' pack 9 l3 [8] l5:'Arg' pval 99 [9] l6:'Arg' pval 99 ('Mfl' pnc 99)l7 er [10] l7:9999 pins 'Rc' pack 1 l3 [11] l8:er,5 ws 'Arg' pval 99 (er((1=1er)2=er[(er0)1])/'incorrect data type')l3 9999 pins 'Val' pack'Arg' pval 99 l7 [12] l9:er,5 ws 'Arg' pval 99 (0 19 =er 0 19 1[(1 0 =(1=1er)^ 0 2 =er[(er0)1])1]'incorrect data type')/l10,l3 (er('Mfl' pval 99)/'not without rep')l3 [13] l10:('Arg' pval 99),'''Val'' pval 99' l7 [14] l11:er3 fd 'Rnp' pval 99 (er(0=10er)/er)l15,l3 [15] l12:('Rnp' pval 99) replace 1fi 'Name' pval 99 l15 [16] l14:('Name' pval 99),'''Rnp'' pval 99' [17] l15:('Tns' pval 99)l17 (1<'Ord' pval 99)l16 9999 pins 'Rc' pack 5 l3 [18] l16:names[numser;] erase er'Tns' pval 99 [19] l17:untie 'Tn' pval 99 996 12 1 =&;;8 71Display Function on Top of Stack DanB 2002 Syntax: ]dfts [lines] The function of the top of the stack will be displayed completely if no lines are specified. Lines can be selected using regular APL expression that can include keywords "to" and "all". For example: ]dfts 0,3 to 12 ]dfts all~7 to 13,19 to 230=4600 0Display enclosed array with boxes DanB 2002 Syntax: ]display array This is the equivalent of APL+Win's ]DISPLAY user command. It displays an array with boxes surrounding each element.915=Download file to PC using ASCII translation DanB 1996 Syntax: ]download [lib] aplfile /tr= /file= /fn= /var (SAM only) This command will take an APL file and download a copy to your PC. The "aplfile" may be the number of a file already tied or the name of a variable (or niladic fn) in the workspace in which case the /var switch must be used. It uses the HDSIO/PC108 functions to do the download. The file created on your PC will have the same name, in your current working directory (usually where [X]RC108 was started) unless the /file switch is specified with a value. A full path may be supplied. Each component of the file will be made into character if numeric and tables (matrices) turned into CR delimited lists (vectors) before any transfer to the PC. Packages won't go through and WILL create problems. Translation is ASCII and CRs are turned into CR,LF. One such pair is sent between each component. If a different translation is desired use the /tr= switch to sax, stsc, none or ipsa (default). If a special function has to be run on each component it can be specified with the /fn= switch in which case nothing is done to any component by the command itself and no error is trapped. This is for adventurous souls only. Examples: ]download myfile goes to on PC ]download 666 /f=c:\temp transfers file tied to 666 to c:\temp ]download myvar /var transfers contents of 'myvar' to ]download 1234567 abc /fn=myfn /file=f:\user\public\lookthis.at /tr=sax assuming <1234567 abc> is accessible each component will be passed on monadic fn in the ws and sent to the PC file specified using the 'sax' translation.=ʸSame as ]UEDIT with /F=file option and same spot replacement DanB 92 Syntax: ]ED object /file=ucmdfile /stop faster than ]EDIT. Will also work on objects on stack (SAM only) and different files. It may be subject to growing replace problems. It does NOT update the 'LAST MOD' timestamp. /stop allows to stop the fn to use your favorite editor or apply custom changes. When ready to file back simply 'lc'. NOTES: it will destroy the object in the workspace if it exists. It does not work on packages or locked fns. Under Unix/Linux the editor function is not available and the EDIT editor is used instead. This means that the ]ed command won't work directly in an S-task. To circumvent that problem use the "run in parent task" escape character "&" at the end of the command as in ]ed myfn& of course you can always use the /stop switch and use the )edit feature of the 'stask' workspace. Just don't forget to 'lc' if you're happy with your editing. :) E T=j rfactorsof n;f;io;p [1] DanB 19970918 prime factors of n [2] io1 r'' signal(n(pPrimeList)*2)16 [3] l10:(0=f(0=fn)/f1ff/f(n*0.5)fp)end [4] we now know which numbers divide n. there may be multiple instances: [5] ok, tack on the rest [6] rr,f [7] (1=nn߫/f)l10 no, divides perfectly [8] rf,factorsof n [9] end:rr[rr,n] =eeibsFind factors of a number DanB 1999 ]factors 321 will find the factors of 321, namely 321: 3 107 3 107=ʐ& /skDecode file access codes DanB 9602 Syntax: ]fdecode [nkeywords] /reverse This user command will return the code associated with access keywords like read, rename, fhold, etc. or the keywords associated with a code like 131070. The /reverse switch will show the keywords or the code(s) NOT associated with the argument. For example ]fdecode read copy 131073 ]fdecode read copy /r 131070 ]fdecode 131070/r read copyl'@T=Є""W@( rwidth fit MAT;io;W;P;F;DIM;width [1] dANb 840614 RESHAPE CHAR MAT TO FIT width. [2] W:WIDTH; F:NO OF FOLDS; P:PAGE LENGTH [3] io0 [4] (0=nc 'width')/'widthpw' [5] FwidthW1DIM 0 1 +MAT [6] DIM[0]FP(1DIM)F [7] r(P,FW)(F,P,W)DIMMAT or= rcFit argument on width 80 (default) or as specified by /WIDTH= switch DanB 92 Syntax: ]FIT expression /WIDTH=[80] Fit argument on width 80 (default) or as specified by /WIDTH= swit= switc=О[27]Show files in library with patterns DanB 95 Syntax: ]flib [lib][patterns] /nofit /cd= /md= This will produce a display max pw wide of all files if pattern is blank in the (personal) library. A list of patterns may be supplied. Result is any matching the patterns. Ex.: ]flib 1234567 B* ** ??*8 /nofit won't display columnwise /cd=date will retain those created after the date given /md=date will retain those last modified after the date given Dates must be supplied in yyyymmdd format.ormat.=xWWum[zShow functions in workspace with patterns DanB 95 Syntax: ]fns [patterns] /nofit This will produce a display max pw wide of all functions if pattern is blank in the workspace. A list of patterns may be supplied. Result is any matching the patterns. Ex.: ]fns B* ** ??*8 If /nofit is supplied the list is returned unformatted. =(h( EXP fori N;F;M;i [1] i''N2io,N-io<1=,N 2iN1N [2] M8,EXP [3] Mfx(3,M)(M'F'),(MEXP),M'Nii+1' [4] F [5] danb 83/9/27 will EXP for i:=N[1](or io) to N[2] n=ʠ)/tExecute expression for I:= IO increasing N times by count DanB 83 Syntax: ]fori expression /i=Ixpr Execute expression containing I as looping variable /I= limits[,count] Long command. Does not need quotes to show where the arguments are. Execute expression for I:= IO increasing N times. or from n[1] to n[2] increasing by n[3] (default 1). Example: IO1 ]fori READ Tie,i /i= 10 will read first 10 components ]fori i,10*i /i= 2 5 display 10 exponent 2 to 5 ]fori Fn i /i=10 5 2 execute Fn10 8 6 NOTE: argument taken 'as is' up to the presence of '/i=' within expression. Although I is available as a variable it does not remain in the workspace upon completion.etion.= ""ONE Show RDCI of the components of a file DanB 95 Syntax: ]frdci file /start= /skip= /end= /lock= /empty The file's (name or tie ) components information is listed starting at the beginning (or at the cpt specified at /START) SKIPPING every /SKIP (default 0) until the end (or /END). If /EMPTY is used empty cpts are shown. If a password is required /LOCK can be used. Display shows file name, size, file information, components in the range requested from start to end. Component number is shown followed by colon (:) if preceeding component was empty. /start and /end may take a sign as in /start=-12. A '+' means after the first component, a '-' means before the last. Ex.: ]frdci myfile /start=-20 to show the last 20 components ]frdci 1001 /end=+12 to stop after the first 12o= 6.82 Read a component from an untied file DanB 2002 Syntax: ]rfread [lib] fname component /keeptied The file will be opened, the component read and returned as result. If the /keeptied switch is set the file won't be untied after the operation.0 =mmanReferenced globals DanB 92 Syntax: ]GLOBALS fn /FULL /FUN /VAR /FMT /UPD This command will produce a list of a function's global references. It will allow to see the names of objects which are referred to globally. If the /FULL switch is supplied the globals referenced by sub-routine calls will also be shown. If the /FUN switch is used ONLY, the objects referred to are visible FUNCTIONS only. If the /VAR switch is used ONLY, the objects referred to are visible VARIABLES (or unknown) only. If the /FMT switch is used, the result is shown in readable format. If the /UPD switch is used, the result is inserted in the function. Note that is being taken in account but that its use may not be interpreted properly. Text in functions with is scanned between the character and the next character on each line where it appears only. Same applies for ELX and ALX. 0 \$ Mx   L'(-4/,7D:ABC,EILNOPhQR,Un@ptq\rDtvwx{T<D<  ll  L\t| t D!#& ()*+D- $8<>LBEJ4LStWi knot$  4||tT<,t< ,,|$TDl$,=cmdaccess pkgstask=@ cmdaddr addr=Ph` xTREEGENcmdcallsxC1 xCOMPARExDF xEQ xFr xFT xGENSYMBxMV xQZ xRD t= timen to= CLEARFILE COMPAREFILESsvm COMPV COMPACK COMPBOOL COMPFN COMPIND COMPVAR DISPLAY FIT FNCR JDMR1 MCOMP UNIQUE VM cmdcompare pkgstask N=H::addr crfromvr COMPFN MCOMP COMPBOOL COMPIND UNIQUE JDMR1CM=д**parse COMPBOOL JDMR1 COMPIND UNIQUE addrx;=ʸ OOdcmdcompufile crfromvr COMPFN MCOMP COMPBOOL COMPIND UNIQUE JDMR1 ftimerep fitp fit=ʸP shadowed=h@to=|cmddownload pkgpcxfr,L4<,l,4<$<<4$,, T $ < $ D\<,T&)t-/01 =,E P ]|^c%XhE8vDp4l|<LT\<Td<|  | Td,\D \$ + 6 HMRUp }=ʀladdr nc ohl del=--cmdfactors parse isprime factorsof PrimeList=fori tstofl fit patmatch=##cmdfns wsnl patmatch manymatch fit=8Ttimefmt cmdfrdci=ʸ MMdparse xMV xC1 xCOMPARE xEQ xFr xFT xGENSYMB xQZ xRD xTREEGEN fit allfns xDFs xDFit=pHtimen daysin IDs=