# 80Ww,`xD& 4 vIh%<= cA i3X35150832p#`aqYIOf ~$^`]LZh[tlt%&YZY4ZZEF]^_`a!bcd2CDefghijklmnopqrtt8t2tב$%!JDa/0p`tla0p  ɕ XY\%ӑ\@%bfԢÓL x^tQ !RST}X\btP͔t |{P?ةP{D4tXr~ l~wė00~`tt 3[ ~ 4\]^! iRlR|QiRxQQJdRKQLdRYRZiRyRR[R\]RRRR^(R!@R XRR\QR,RRQ@QQlRhR\TW\tT DanB 951203 will EXP for i:=N[1](or io) to N[2] incr by N[3]T(c F 11N restartablem($\(2 3 N)/2,3 $< danb execute expression for 'i' in range <l wyz|GI   l])l( \EXP fori N;F;i;i;0?A(_ i''1NZ2:NN,1(note,2VERSION( ;  &(3:((1N)-/2N)0 (4Zi''N   a/% TNN'F'fx(3,0)(0'F N'),(0EXP),0'',(i<0)'1N-ii+i'T0 Nio,N-~io count from io0|\u,La```baatapcPbbX``013,EXPgo<H""use 'clearfile' to erase the file.<(UU U qf UU($ r t ,  $ [ t05 c , , ,/20  S(9  O , ($  O , $  m,   f a,//2,$ ڕ |.a$  ٕ  $ > Function $P ? [ , ,pe, , ,ڕ [ ,/ , P$ t /12$L D L 9 ,, , 3+ \,,/\ ڔL(p   $g0(,4  ? ? ,  ? =,D[5 % @ ?, \t,  [7] alx=DMD$ nolastline$D14 / ?\ ? ,g03+  [4] D([ ]  ?t(*.M0X   m + *0s [0P ? [ , ,ܷ, , , [ ,/ , P  m,14   @ ?,D[ ]2 / \ \ @tv $, @DMDD14 2 / \ \ ?Di $, ?] D$[ ]  m x$  ,   + \ X,    L 9 \DD 6  /  L0   ,   0D 1 \it , $,  D4] $ tv0 t4H 8 #,  \t, #  // H((2 1p)0 21 array(tl ֨+kklLl0lklkhl(mt ػokPchk p;iot ('(('Package')0,p)0d(L$  thL 1(2>p)0(iook0p44ok311,p 3 col matrix4P DanB 19980824 verify Package is genuine - not valid for SAPLP<(2=1,p)0 1st a string, 2nd a matrix< `O     `$rn Pval p;io;b$/ ֨+m@mnpo`nonoPo$onos4Ⱥ n(\' 'n)/n(-bb' '=n)n,nef4<r2,bp <: danb 1999 select a value from a package<p1,p  `A n' notr'' ,8error r/'not in package' ,4T<rr01b/p[;1] unknowns rejected4,error r/'domain error'v,$A r(Pchk p)1n $4 r1+/bp[;0] n sanity checks4io0 $rnames Pnc p;cl $ <clrp[;1+io] ,6names1r penclose names,Ppio,p$|.(nc'names')0 $@ r' '=names(r1r' '=names)/names,' ',names@LT   mL(xr(cl,0)[p[;io]names](tF ֨+ pqqpDpppdp\qst@ DanB 19980824 name class of names in package@H H|r0 0''  ȣ (Pchk x)0f -rPnames x;io h l ֨+r8rsDsrr`sssh'rio0 '(P (0x,(1,x)[;0])0 (4X DanB 1997 replace by proper fn4` rx D= M, | \    |#  DD + |  , , 3 |.|5D$ [,Q]LI4$4 #t     4,D  W  V0! ,d T\ ,\,  /  , \,  + /3,  d H tt Y $  )+ $ &    (7  N\ M ((  + 3  ((\  , ($  |.a$  $    $ xstr 4 #  D,\,, 4D4 / @\ @ ,xw03+ [4] D([5  / @t(*.  R$  ,  $,    , 123,4=1 8# # , ,. 4(@A C  t(0  T O , t, 0(  + )3 O(00  Pz,3  044 $ ) N/  M 4(  $,  (4 !  , / 44 " + /t / /t,  44=1 8!   Y8 X, sa 4  t  ,  , ,,(  W V0/L (<D 3T t\t {, |D$  x 0$ L ,  |t , 0, 01  w v | ~00 u  ,+,\, #   ,+,\, " , \t, ,   # ", \,$  0! $(  |/ |@($ char num $H 7 w v0U/  , , t,  HD" . | hz, ,|}, \DDl /h| xԂ삕,}, / ,D    $ objects are $, : \ |+ :,0(3   D, ((  \, (  ~  (  w v 0(02,  {܃ x,  ,d(6    (4 6$ } w  v  , 4(  t |0(0  "\ 0 Lxstr ` M  |~ \,,  \,,`(  of enclosures(0  " ,D, 0( Ԁ 0 (00(   x((l/(x8  T (D 0*t0 \,  D(  9t ((h t  (@  t  H 8 t\t@ H$   R0$ T avb e~d c $ t /$,  /D , $ t /$ 0 'F , t +D,,e$ t  $(an  @ ?0U/ j(cn<f$$these are different objects of rank < 61st2nd D , , x,L, ,/2  D(  k\ |((  - |//2 (dL***0scalars vectors matrices0$va t /$4ex e"ܵ yt tf4(; common objects(q normo ,= M @ @ ,  @ ,,8  | / ," +,dH$ 8  , !,Թ !, , H  t ` D4 . ! \,+  !,t .AD, eX1t,XDX0D,D T<@("(('l*\p(P<@.)&dpx7A,+@9l2=@BF$JK8M`QtCLST|:URTLXI%,@hf m\j4hekpildX xHXd-|$lna;86]5(@w 1l@X ~X#(|p@!0`vL`rtqtpos0m}(p <{DPqG/r|,cTH(kHh|$ y`,\X^Tp<bPx<(d3p"\ 4H|tgHpEd$8H4\H|u \ Hp0dLdN([, \$4&tXlL# d|$L `8;OV7?D@( <2PE84$hT_|Z0z ,G MTW|W>T@(Zt8D,tF6x-N,:e@)1>*,RT\<D=Yd,J,0hY X}P` /l+|HscPxLL"`t9HB0_X.xqLv`$8y]ߖߖߖ'|bLߖa!dV4tߖxߖߖPߖ<ߖ`ޖLޖ8ޖA$ޖhݖ?ޖݖ ݖIޖ`tޖpޖޖUܖ~ܖܖܖpܖgܖޖ3@ܖrޖdߖ\ݖߖ4ݖ ݖݖmXܖݖߖ(ߖݖݖݖHpݖHݖޖ,ܖۖoܖۖܖۖۖۖ|ۖdۖC,ۖ|ۖHۖՖՖۖՖՖՖՖ,Ֆ\ՖDՖԖԖԖԖtՖ`ԖHԖԖxԖ0ԖՖӖӖӖԖ<͖$͖Жp͖͖P͖zȑ䖖བд ͖ط(d \hΖK\T  ȧL܍Tܣu͖ (T!ȣ$pҖ$PΖ숖Q HHih8p|ĖLȖwnܯll%XŖT,ŖH3PÖCpkļ0 OʖV,"hɖזl#Z$xLQDPԔJ E$֖ jH4`ǖUӖǖN^M:A\0Hٖٖ]_PH|oΖ\0–igH– eK`–}-T^4pjYI{B g ?59Ж͖Ӗ$Ж $ΖҖ~іyӖ|yO8t tf ?fe lXds\Ӗ)oj)xlV(v5v7gg{8q ap>qJ}qt=4\F/h?P)HK\Lr`w\oXlKnwEHfpdbGXt4zܕ|TqeqtCpq Variable $77VALUE ERROR ispack[1] r2Pnames p ^ ispack jdmr1 licence ljust manymatch mcomp movetofile note nub open patmatch pick rowfind sqz strlen timen toma  ڕ  $H6    $4 # l - ,0+ /+ |4D & j ] tD , D$H$4 # . ./\, E, . 4,  m ] t,0'   a, `049 # / //\, F, /4,= M t00 ,,  | . ," *,D & n |   D  D,  + / ,D> %t    , /.>?>DD & g ] t\ ,/)B.jD -B t ` 4A " fD <D ;4$TB   , $(F  hڕ ((F  , |//2 (dL***    D 4 p - D, / C ./, \ D$@ t  |$ |+ (1Q)P^1P)/PARMS]4$PARMS[P/P]1d $X Compressor: any double quote or last quote not in \ or double delim.XHchcPTS> Delimiters: spaces not in quotes or 1st quoteH( TQ>1Q T=1st QUOTE(l1: IQ^1Q l $ \QPARMS'''' $ L5:SPARMS' ' @ c0 The following allows to consider '' properlyc@P3  Delimit each token in the argument and return them delimitedP L200 ,Q,'',(I/'1(\S)/'),'T' a 0$DL4:I/S''''=T 0$,,1 T(-SS)T$DL3:(/S' '=T)L4 $DĄ Drop trailing spaces, remove surrounding quotesD@IERROR P/'INVALID VALUE FOR SWITCH ',(I-1)S@@p,bP(E^^/TPAT)EdFn0L  | nbioLT danb 2003 send 2 wss to file - won't work unless )Xload allowed Trispack p08 one-letter type for ObjectdFn0(ba cat1 w ( bi[n].=(n1a)i'(8 p8( i(3010a)'avb'(L@ DanB 1992 default CHARACTER STRING r BY value IF IT 0t]L8 8H`xmt' )xload ',ws1,c,')copy ',ws,' tws',c,'tws',c utH  ERASE 'B'P GHYZP$X05[7;]07elx$(r0)mod |  ,,ޕ8ߕ<J$t|0JDLM,twsnl 2 3(.(0tws 1 0 tws)65(8default|rcond/what  ib/n  v((vv)=v)/v <X file fstie tie((tie)tie0,fnums)0dFn<pgrade$p B(B)-C36524R$$,(' '=10value)/0 $H ;Zx0NHR(A-R)365elx'DM'H((CRv1)^CRv2)v10 can we make these into matrices?HL   LTdrno:'*** unable to read access matrix of ',,FNAMES[FNUMS1tie;] 8T @Prwhat if cond  bSnp   rvtom,CR,obj  $W05[5;]07rl$ funtie fnums ctio0 (пRtimen A;B;C;D;io;ct( @Pr(+/^\' '=m)m D***** objects comparison utility ws version D  (ispack o)0 Lpat1(r1rpat' ')/pat' ',pat remove excess blankst]L/C3650 ,gradeavright,[1] leftW,$H05[6;]07lx$( rn pick array ws rows083,(cr 1tws[1;]) fappend 1Fn0T*   G T\vm4key 0 simulate y LBt' ' B is Blanks, S Single char NOT Blank, M Many SL$Xrtomat obj;t;ps_$Tvalue@[rowfind8  8t lX chk if * only and exit else grab chars up to * and goto many if 1st *X!patmatch(h jb/b(1-n)t1p(@079 4'io ct pp pw rl lx elxalxsa '@\Ўtws((1tws)'Vsys ')(twstws0,61twstws)tws'VF'[2 3 nc tws],tws\.elx'',3,- 3,(1tws[1;])fappend 1,H BR- 0 2 29 57 88 118 149 179 210 241 271 302 332[C]+BHT 't' is the text table shrunk as we go. 'r' is resulting matchesTTp1n[i],0ib+((1i)-1i(j/i),ib)/100+/j2=b'*?'n'.',pT4 S'?' 8 rvalue 8 A(A-D86400000000A)86400000000 u8  RR,B 8  8L normalize pattern like ?*?* to ??* (** is reduced to *) L$selectgraderows$$]indexiotarows$0,` mat left just for compare00(r1)0 also a valid valueFn0Xrtype o(,r'cn'[0 1 0''10o](De xe'DTR dp[0]M $8S05[4;]07pw$   (isencl o)0 8 danb 83/10/12 SQeeZe out extra spaces88 ,P?`|w8, B' '=tdn(it),d' ' ,WRA+693902 p tnt   rir (Xb1,(1b)1bM=p,p ( 00707,'=',05 D 05(9,07/(lx),(sa),15,(elx),alx)' 'DH  0 0 (wsid (1 0si) (wsts,+/size tws))fappend 1 H.n0m(b)(,bl./0,bl)\b/mdFn0@Ć ,`(@ft@tObe ,dݕL(ȁ l 聕ttX0 inbuf xmt,')load ',ws,c,'compfile ''',Sw,'''',c,(''1lx)/lx,cX80 <8@4 3,(1tws[1;],' *** TOO BIG ***')fappend 1@$05[8;]07alx$HaAA1000  BB+C1461R $prstrlen vec;io $ G num is broad D much more efficient than ^.= for large matricesD DD,A  timen( n[1](p,p)1nrt (8index[(/rightleft[index;])/iota]08D 0$$*rr default value $Db danb 840531 - vector from matrix (compare grp) DHARG Y 0$uc 0 0 sep2CR$Drljust m( left justify matrix((  non Sharp APL system(80 m 88," danb eliminate doubles from list v 8@dab ,(4@yt@0tcrfnn fncr pak;fncr;n;l;rEpdFn0,whatcond8io1J  rf fmt1cr V ctcnl io0- C(+\C)[R]L JKML D C[0 31 59 90 120 151 181 212 243 273 304 334]1 DL   (Ct]L Gmvtom v;l;b;d yst ,0,h> pTs)wr1'')/CR,CR,'> Function ',n,CR,r1 @m2H230:O z,CR,CR,'use ''clearfile'' to erase the file.'H`* O fit in2( NOTE 2=(m1)=m2(|,br sc if=/ot?D} SHOW: 1=show names ;2=contents ;3=both ;0=nothingD8nPcrfncr pak fn desc without having to erase previous valueXYZPrvm r,cr(Xf'R< >P<[>Q<]>BLI5'(8\ ,8Gt8@Dvty1'] [',,(3 4 'num charencl')['nce'ty;]y@DD (3) +/,m is a maximum for constraints (1) and (2)D<0^O CR,'***',(4 0 lim),' common objects',CR<4X10:ws2FREAD tie,s2i 2nd ws 4, skipt(tx) manymatch n1,dim8\V w:width; f:no of folds; p:page length8((n'sp_vr''',fnn,''''r((H 199805 include ifns(T if ANY output (name or diffs) is required we scan the whole thingT<P!R0fx'O x' ((result/'RR,,CR,'),'x')Fn<, /result return all output,,~r11n1FREAD tie,s1+1,002(8('VI?'typ)/l10,2l90 ((lccl displayfp obj;typ(pdisplayfpL8 diag:n+/^\, 0 0 b follow diagonal as far as possiblet]L<~ danb 840614 reshape char mat to fit pwFn<4l10:crfxcr, n 'fix' the fn4X!ljust(YRR,DT|(n(1t SSv1)1t SSv2)exit exit if the constraint is filledTT   HTPc'objects differ ',t'in shape (',(v1),' and ',(v2),')'P4mat(p,fw) 1 0 2 (f,p,w)dimmat4, rpat manymatch list;io;n,| , $MtVd!|xmt$x (patnpat)l10$< Fn< 0D 0 60 60 D $HBC,[0.5+C] B$<4- danb 20030417 format obj a la Dyadic APLn<@3/0 ,)h ܕ@x   }| x@ ,`t@$05[9;]07sa $ R(CRobj)l20J ERASE 'A C'  parseio1JXtype@ MANY: rotate left until next matching string@L End of pattern. Keep whatever doesn't have a reminder.LTܝ SIMPLE PATTERN: all chars must be non blank and non ? must matchT , |j K{ y !!"#$%&'(**+4trp patmatch t;io;b;d;i;j;n;B;M;So4  ,%$|xq\t $(  H  \  L Dw x  [ t$ C X >  #h^>(Ywh^M |, ($M4l1l-1+1l(~b)/bdmv,d1v 4T< , J#' T(Yr'p' $RR+(R-C)36524 $8G 8H find length of each section where delimiter is 1vecHDssqz s;w,L|var:('p'=tytype val)pak ,@ ,ޕXt@$ufix:rtomat obj bj$ compare utility This ws will provide useful info between 2 objects, mainly the difference between them. there are 3 main fns: r p1 compack p2 compares 2 packages, calls r c1 compfn c2 compares 2 fns; '' if identical. c1 and c2 are the cr of fns. r v1 compvar v2 compares 2 variables; '' if same. v1 (or v2) may be a package in which case compack will be called and so on. Enclosed arrays are detailed only if they are vectors of same shape. Differences are shown on simple objects of rank 2 or less or if they are small enough. The format of compfn is as follow: 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 assumtions. Each line of the fn on the left is preceded by its line number [xx]. Where the line has been deleted a symbol appears ( or *) before the line number. Where a new line has been inserted there is no line numbering and a symbol (like ) may appear. 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 (cr 'fna') compfn cr 'fnb' [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 lengthy output of big functions with little difference only sections of the function are shown, those where the changes occurred plus a couple of lines before and after (see var ZONE). In order to compare entire wss it is necessary to send the wss on file and to use the 'compfile' program as follow: )xload ws1 )copy compare tws tws transfer the ws )xload ws2 )copy compare tws tws )load compare compfile '/switches (see below)' clearfile to clear file space is the Transfer WS function. It moves the variables and functions of the ws onto file preceded by some ws info. If the file does not exist it is created. After has been run, should be run in order to get rid of the file easily. Note: this version does not always report the stack state compfile may not work fine for very large objects pw is used to delimit output Under APL+Win or SAPL (if you have multi-task access) it might be easier to use the program as follows: 'ws1' compare 'ws2 /switches' Under Dyalog the same program will work but will report improperly some elements like the stack. Switches You can use the following switches to /xnames= exclude the names that follow. A simple pattern can be given. /xstr= exclude the objects with that string in it /norm will left justify the fns before comparing /show= temporary replacement for SHOW (see below) --- Output specifications; variable SHOW The amount of info displayed is determined by a few globals. One of them, SHOW, contains 3 values for each one of the SECTIONS of the report, that is the 2 "unique symbols" sections and the "common symbols" section, i.e. - the symbols found ONLY in the first object/ws - those found ONLY in the second one - those found in both each section has 3 PROPERTIES: - the number of symbols - their names - their contents (or difference) The first property is always displayed. The last 2 depend on the section value in SHOW: if 0 nothing is shown 1 the names only are displayed 2 their contents/difference only is displayed 3 both The default value is 1 1 3, that is the first 2 sections have their names displayed only and the third one shows name and differences. To change temporarily this setting do, for example: 'ws1' compare 'ws2 /show=2' to show names only for all sections Another global affecting display is NLINES which shows the first N lines of a variable in the "unique symbols" area. Yet another one is ZONE which affect the display of differences between objects. This is the number of lines shown before and after the differences found. --- Files --- To compare 2 files use 'file1' comparefiles 'file2' This will compare each component with same number. That is, if file1 ranges from components 10 to 20 and file2 ranges from 15 to 45 then only components 15 to 20 will be compared. --- Globals --- DELINS 2 chars for display of fn lines differences to the left NLINES maximum number of lines shown for variables NOLASTLINE ignores Logos style pathnames tag to compare if set to 1 (default) SHOW display code per section ZONE number of lines to keep after changes in fnt ,L$e$> ֖0 t$ clobj fncr cl 03 $8@Z danb 840629 display object with value8vnX#donno" pnp  t,t ps_0JP, DanB 2001 default var 01 by value 02. '' in name returnsPp!defaultmany8rfi vexceptchkr< Lkvw| xyEFzR9 {|}~#$&-/2677<EGHK  !"#%%&'()*+,-./0125556789:;<=>?@ABCDEFHHIJKLMNOPQRSTUVWXYZ]]]__`abcdefghijrm/x<0@ danb 2003 format cr of fndFn0Ԙ07Lindexleft rowfind right;sl;sr;grade;rows;select;iota;i;ioL f1ljust f1 2 $hb The gathering fn$mat:0exitmaxwL, , !(TLL8 ]8qisencl<!t(0,n)(d(/B[;n])<֖?ٖ@`AٖATuB,PB$HC4\CHtD촕DD$E0ɖE8_FdÖGl֖HіIJ]JJ|TKL(MpN$NܧODXP8,QԤQ{RSזTHxTzDU0xUUʖV@ؖWXƖ躕XF|XX_,YÖYngZ`,eZ8eZȸd[D\pPPv\h\`|Ph]X^$c^`e_Ld`0daNthܗ ]goXindex[select/grade]((~select)/grade)[1+(select/select)-iota]-rowss X<[r0list patterns are delimited by blanks<- cc+n 1,ɖ w\]`Ȗ[  , ] x PtxxǖwVw(v\vถxM\x|ɖ dd˖dX|d,Ö4xЖ ǖȖŖǖ,Ӗ$ux@hZxpFxǖ ǖ$utp  licenceaiX!rdr 4openXX returns the locations of the rows of right within left for char mats X\i0,1(slleft(2 1 1 ,left)left)srright(2 1 1 ,right)rightR**\(Pb[j]t[j.+i]^.=p[i] (tst,(0t)'(no difference)'1,$ xm1 cat1 cm2 $ P (0yy-f)l4 K O(2ws1),2ws2 $l30:s1fsize t1,k1 $P` GHYZP2 dmany select@stm ,l Tpt@_ 0gtisencl aPT this function is one of the seven wonders of the modern worldP@h Show objects in the 1st file NOT in the 2nd o@$Pl30:(f1f2)c'' $0obj' outstanding objects in '0( ii/' of enclosures'((var:(=/sot='e')se (ha ,LJږxxG(^(t th@8N m has the properties that:(1) 1(+/m),+m4@,$! xcompbool m1 jdmr1 m2 *,ܘ150:z'' ,H" original fn by psa 1984p,Rnorm,dim[io0]fp(1dim)f,v1many:dt  0i/b\<\j 8. k1k20("limlim default lim(P /xstr specifies the strings to specifically exclude/includeP = x(t2,n2)[j;] e n2n n=name X> would these be fns by any chance (or logos scripts if start w [1])? XXH?end: Display variables - try to be smart: use pw to fit the output XX@ the value instead and '' will use of 02 instead of 02 itself.X8UnP O fit in1  xd(d,x)[r;] ( O fit dif, 0 2 obj2;( b*q;<,-[\./|j *+EF]^_`a!bcd2CDe&f7g9h=iAjCkElJmTnXo[p^q_ra  !"$$%&'***+,-.111234567:::;<=AAAABCDEFGIIJKLMOOQQRSTUVWXYZ[]]```abceefghijknnnopqrstuvwxyz{|}~[<؈('nolastline' default NOLASTLINE)l10dFn<lX@cval display obj;sep;l;d;s;o;ELX;ps_;cl;n;ty@010LX Right arg cannot be a package0 $_csep,obj,ty,c $ t'' same rank$,\ c0o12 2 3 '1st2nd' 4 ,L ,{\gn,utL  0` f1(1 0 f1),[io](1b)b\b/c0,4f1(2-'' 1 1 f1)f1 ,4[typ'I???VFF----V'[3+obj Onc cl] 4L4\ ,VJpGăm0btL{iFr (=/t)v038 drop last comment if NOLASTLINE set8| ,o>(`ld\hO@ho8jt|0hwf:csep,obj,' [*ws full*]' '0L return nos. from 1 to +/b for each element of b such thatLOFn 0pakwfse8fn:csep,o,(0ofmtfn val)/' ',obj e8H chkd |Rs''01 bJ ,H\ s'p'=ot(type v1),type v2,,chkr:((nv1)=tv2)sr,0tn'~'=1t'xstr' default 0 0l ,솖ٖHDd̞jІP̖hfftP͖ xf cf e  U ̖D̖dBxHgt̖HglehPw0| wyhP\lhPex|etllot@n('Var1' cat1 v1) cat2 ' ','Var2 ' cat1 v2 '@t[ chkdhbdescribeD1\(,1Rs01 '00'),'',,1Ex'02' 02 01 D0R nn,1v20 displayencl v2ot0 0R c' =',val <(var,var,var,fn,fn,fi,donno)['VPNFOI'cl]n<(elx'wf'(pPfi:csep,obj fnfd val (Q004st if=/s(0=obj)0fnn4d2 199805 modified to trap ws full4 ,dN$>kll`uk\>$)lk |p  l d dr ,g XȄL hgk4K,qcheckqsp 'note,2VERSION',,c(2CR),' component ' ,, (''r1p1 compfn p2)170,L]O CR,(ij)/'NOTE: - wss size differ by ',(i-j),' bytes.'L4?O '*** comparing ',(1 pick ws1),c]4 lup,ii+1D  n is strictly increasing and b/n is +/b(io=1)D<Vn'Var1 ' cat2 v1 cat2 ' Var2 ' cat2 v2 dFn<`H , T0s`Rs$aEx2Ex+size 01$,0001 default 02;Ex;Rs,8crtomat r (h r'',(''r'_'),''(exitLtl+/(NLINES+.+\lpw)lstrlen dCR,vm 0 displayencl valL@ln ,[? @A|BCHD oDjEtFjFDhGG|HIqJԝK4rtH@ 0li4P 3- show objects common to both ws4,$! (=/t2nobj[i;])190 ,Rcompcm100L|st:b(br/b)(bcb)/b get rid of zero rows and columnsL /x+/^\^/~b }x[i+1;]0LP@tljust '/= /lim=' parset2f2 accept different limitsL8ws28\Vcr(n33+2,fnn)'0fncr 1;x;',fnn8`  Q dFFn`8 danb 840629 display object in CLuster8< Can be used to determine what's in usedFn<0pdonno:csep,obj,' is unknown!'00prbox displayencl obj;ps_;shdFn0 vvm m(Ystrlenval$r1 displayenclobj$0pak:csep,obj,' [',PTYPE,']' Fn0qnote fsize M'*'(D 0101 except ''(<\ display obj with lines surrounding boxesn<$(isencl obj)fix $8Ll20:n1cn1 keep common objects only880]$ws1 movetofile ws2$ <t1k1 open f1 ,D use a fn to gather output,8E optionally followed by :passnumber8'8?t2n'~'1s ( cf1 compfn f2;b;s;n(nexitJ4@n1+\n/n(1n)-1nb/b1,b,14d exit@!display c''  tnt}chkd(exitp c'' vchkd:endd^ dlc sns nv1xSHOW@Lfn:lup if 0n1(n fncr p1) compfn n fncr p22@n[h Ht DanB 19980423 check sp_ for lx element and executeH$0 skipskip~show[2]$4xW'O p2 displayfp NL[i;]' fori 1NL40clearfile 8J x(1+2ZONE)-ZONE zone of display8,f2(8l10 if 'c'type f2 (bclearfile(h1ws1 compare ws2;b;Sw(  b(n,n)b l9 show[5]120 P c'' if they differ but are excluded from being displayed P4cc,(ld),((l)^ld)/'...(more)'44xc(0n)c,CR,nvm(v1) compcmv2 4L We can now display columnwise or 22 or 14 (with IDs)LD danb 84/5/30 - compare 2 variables. c'' if v1v2D c''$c1s1+1+c1/c1 1]$xs1  t ws2,1ws22  im0R io0 4Dc(t[1])/' created ',6timen t[2]4Hf2,' has ',(--/t),' components starting at ',1t2s2HLD,'xp (FREAD t1,i,k1) compvar (FREAD t2,i,k2)' fori limL8J Ex: 'abc' comparefiles 'def /lim=3 8'80PYl10:f2sqz,FNAMES[FNUMSt2;]0|defaultqlx8ر (lim1obj(c1/t1),c2t2,n2)220 8 X show[4]70 $m(b)rcio0DA$0 character matrix comparison0T display the object m1 together with the lines from m2 which areT pathcopyV cc+y @ then uses this to calculate result at line l4@~,yĖϖt,^HĖ  x ʖ Ė Ȗ \  ̠hƖ`ؼ8ƖZȖ\mŖ^(ҖÖZ$fcvm f1 compcm f2$ Rend:mbrbc\m 4212:170 if ''r1p1 compvar p24 L\x[i;](-s)nf  r/x |resulthCNLINES  n1 0 1 n1 @Vicat2<filsS<' diag cut back b and try diagonal againn<" ii-1 mOnames4 Pathfullpath,nobj[i;] except ' '48exit if maxwend:d(1any''),Z$l.t'~'=1x $dj1t23 pick ws2$  s2fsize t2,k2 8110:(/i~c2n1 rowfind n2)150 884 List objects in left but not in right8t, Dl10:defaultqlx try this one otherwiseD@c'objects differ in rank: ',(n),' and ',t @$lup:(m(/show[6 3])220$< NLin18Щ 8|lVERSION y c2n Onc p2) $al10:clobj Oval cl$W= ףp=@`a(rsa)a < &FnFn<_sb$x c2s2+1+c2/c22s$ elx'nope' show[2]l40 $dcheckqsp defaultqlx$4<samecl:(c1= 1 2 9 2 3 4)/3/var,fn48\O c/cr2,' variable ',Path,CR,vm n1 t8̟n84Xse:exit if v1v2 do we have a match?8$(c2=c1)samecl $$i1t23 pick ws1$\ since we need to keep track of nested package we have to use a global.din\$_ s2v2vtom CR,v2 $ _l10:ra,[io] b 8D Verify the file has more than 1 ws:8_c2@var:lup if 0n1(n Oval p1) compvar n Oval p2@ @L,@at@ st ws1ws2 4Pdm1 compcm m2;x;r;c;io;del;fmt.4  VWXY m1|lPATH?60: L\rnam Pval obj TSS pzstr SS txtbJ X  "# Xl10:ra,bbX  "#  X t2k2 open f2e $Ls1v1vtom CR,v1 $$l20:(0f2)l30 $ Hb(1sa=sb)l10 $hbra cat1 b;sa;sb$$P'Path' default '' $<$ returns 2: different 'text of changes'Fn<  f'wcompare ' ! s1s2 TP bboolean matrix b m is b with some of the 1's replaced by 0TT main algorithm calculates the boolean matrix x (line l1) where :T@T the file will have to be read several times@tdel@)mcompbool b;br;bc;r;c;x;y;z;i;li;s;fix;n;io;f@?SwHarg'/xnames= /norm /show= /xstr= /result' parse argH(c(ws1[2]ws2[2])50 (dif[i]'' T We display the names even tho we may want to skip their displayT0U(/i~c1n2 rowfind n1)100 0Їxstr,170110$xl15:(0f1)l20 $ R r2t2n2[;1] Mfullpath|,䭖p|8h{؜{p$ϖyt|Ȯc1$(0xxnames)170$ _ n2Onames p2 D won't use up more space if the same but  willDH ddel,fmt fmtxr row nos, 6 wide, =left, =rightH dd[r;]G,<pthy](zuuydiltuy ty DZt t@j `j Љv ti j vt (̿ names have been found(  n2 0 1 n2 $ fmt'[,Q]LI4' $xZ70v Windex@,$ҖHԵ@|fmt rOnames obj;n ,r1'')/CR,CR,'> Variable ',n,CR,r1 @@$ r(compind r),c/compind~c order of display@(ler1 if limir1+s1+2(P9 /norm normalizes fns before comparing (left justifies them)P8D,O CR,'***',(4 0 +/i),obj,1 pick ws2 8 fixD 33 comparefiles 789 - tie numbers acceptedD \ names in obj $sd if i(v1)v2$  z(1b)i0 |lim<O ' ',Path,' has an unknown class: ',c1n<Ht if args are empty vectors they're replaced by 0 0'' HPany\ $k1@,ĶX@tk2 t  f1(t-1)f1 $lclnam Onc obj;x$lOval4xW danb 20030328 value of nam in obj4var$scl:cc,CR,v1,v2 $ tQ (li>ii+1)l1 0tieopen 11n vrsr<dfO(0=Z)cr2,'*** ',(m),' common objects' n<pNLTtxtL4Xr 1 0 (a(sa21,(,a),a)a)b(sb21,(,b),b)bL`a(rsa)a , show[6]/'O vm fit obj't,Dcshow[3] f FERASE n ' ԏ NLin21<'cfx 3 9 'xp x (x)0 c,ixCR'dFn<$l40:m1objn1 $@4, danb 840701 erase file holding transfered wss@L83c'objects are ',t,(3 8 'scalars vectors matrices')[n;],iL  O 'Stacks: '  $0msg'File erased' $ lup,any1dD  ! ( dFFnd anyl20@,enc:c'*** enclosed arrays' each is checked@$ l5:c0,1(f1)f2 $[ exit"vec:n0, drop LOGOS pathname tags,,| f2(2-'' 1 1 f2)f2,x|(1=n)evccompfncompind@compvar\x  ;<=  1\X4 Because we can't do p1,p2 with packages we need to have 2 args. And}X$xcalc:(0b)endes$s244 some objects have to be shown.4$('VN'.=1t)212 $Htt(10 0 getamof t1,k1) compcm(10 0 getamof t2,k2)HD compare 2 files as file1 file2. keys optional.D4| arg is 2 files (one on each side)4,`x–D(Ȗ\ph t1@l (0=y1z)end y is the number of matches;f@0f18FUNTIE(/f SS FNAMES,' ')/tFNUMSfau8,  lim(1s1s2),1+12s1s2,,pany/i0=cn2 rowfind n1,, O '*** ',(+/i),obj,'1st' ,@ws1FREAD tie,s1 1st ws name and ts and wa@0tf1':' |ll30U,Hh190:p1FREAD tie,c1[i] ,<f Some objects may have been screened out <L1 rr+nn (p. m[r+s[0];c++s[1]]b(9 100"skipsb X endl+Path,) x(b)0 initialise loop,dzn1b  p f2(t-1)f2 $P (isencl ws2)l1 $ws1L (2) each 1 is below and to the right of the previous 1L<l1:x[i;]z10,z\zy[i],(1z)+1b[i;] <H@f1,' has ',(--/t),' components starting at ',1t2s1H8J120:(nc1+s2+j(skip ',m,' has different classes (',t[1],' and ',t[2],')' X, (show[1]0xxnames)60,4show, 2 2 3show default SHOWs4r 0 3 0<0U'O(FREAD tie,c[i]) display x[i;]' fori n<$ v2ljust 0 5 v2 $ lup:(ni)exit 1100:skip0  }170g150pP "?@ /  !P  ! P0&l12 fopen9createix0fileinblist/Ns)Namspprfsz.infilefix b17rngnoam<7tIEinfileqML(xmemvspuacdc( member2KPtestparseljcompcdef@_nofopeniz\ovsinvsfvvmĆvmiovvipovspPvtc0ovvhovvf,pvvc@}mrrun|g0}sc_}xz ~a_P~ec_AFps_sys`FP~Y vvpdZЉvtfnvsc@pvtmȴl45qovem2nomsgendupW798FcR@W78Ul1408 showtrans`;l150PCodT8Ttesofa2kL'ml@<testforallHAV8rTptestfordywfdfmdrDexec`dr0descfd$xfrfromexecrepPier_rorVERSIONwsidH{trlevhmDnponotessw(memltl80x3l60l3<tno$qlbrxArGl700chk<4Ertl0qfnadrl100 asciistrsam`Jrange(argT=replaceefAt$txtreplposHlistL patl40Al9cm!create_debug,patnJfopen!objsJamTQxfrtoobt rnL!parseLsstranslate<nameofjtspRArgfilel1104aplswit 8xfrfromHl904mask0IparmsQcompsegPW ,DISPLAYTP'CMDDISPLAY DISPLAYS HWT0FSBROWSEEyBL̊P  MATIOTAOBJ IFERRIN@YGLOBALPWkMATIOTAeUCASEOBJERRMSGPKGTIEDXTTYPEUFILESVARCDISPLAY<NLDCDEBOBJGLOBALCTdOVEROBJDXGLOBALALX -DEBGLOBALIOYMATRIFYfXPNAMES\UCASEjGLOBALELXxxE1 MATRIFYOBJR hz-hFLUCMD, 4JRXFOPENlOVERP3 6xx5 10]UCMD2V7119`E,zApX@8IhCxkHUV12TWlZPJx14Y13T1617P1820о15pApCL1cRESULTVLeHC)PW6VCxeph1921X$HBHHTl22\LNXK QH$RCSHHL,VT<D|BVDBPUPARMSX87`xstmpW80 rtestXmPDEFLDOUT$nTIEUFTrhPFTNUMeGETOPT infilefrltestl01pickR4boutvcpPtest\wnstl40}l50tdiscutltestxvneptUa QZ&R\c$/PRdIkN>$/SRFT)DWR\lCdl1E KL~PI 2\ m vFv/PPAl2k rp e@ &  0S   h0t\D,t\D,h<PdescribextXchangesr_n_N_zPdefqsp xFrl74nl5 bufXfrObjsallrecthdl@writeobjtiecptlim,amrGXhandle,Hl20source97pl10toreadnOaoNStIeP5Lf7lImtrEf99s(SrHPuPmVdEfSr<98lUrRePdHiDopenfilel30PeNdxAlL`asnLread$xl|closed95(92<1<93@iTems91296Po94xPuP0readBuf90XfrIDpCfiLewiNwSD sScR489 75\8883p8785H8481 767977HW97W9878vAl74W87W93W95obJret W91482dW92880W90p86$W96obJ\W99xfre0W83lNmW86i9W84W85DW82F5XW81XW88infileDW89EXPM8xW94osresfn4dlmHb\tfXl05createell25sD Xmatcom(l60 xfrfileforiPselNaMsCRLFnd_F_7formePnames line0,id_bUfdFnX96X95X94X93X92X91 X90 X894X88Hp3cnvR_ Pncfix0'changea cl[HmFfiLe4xatdefinenpsinWsE nl2op DFxO_Dv_, l120,fns@id'To_|Pexl15vaLue8all2xlatesysIDBlcr 98X99`namesX versionxfr PinsX Plock PisIDdescribesr<XsDl160alline1q l130e X99 X98lX97Create@c_ b_(okPdefPPval(Pchkcopyrightx@PackPpdefcOdenrDM f1] ' vTEJsiz4ap@6ma F P equivalence d^=1S^XdPBRZ.?@HIuFDvwS8f>l2;<cikqmb