29 lines
949 B
Mathematica
29 lines
949 B
Mathematica
|
XBDHNTEG ;INTEGRITY CHECKER;JUN 12, 1991
|
||
|
;;4.0;XB;;Jul 20, 2009;Build 2
|
||
|
;
|
||
|
START ;
|
||
|
NEW BYTE,COUNT,RTN
|
||
|
K ^UTILITY($J)
|
||
|
F I=1:1 S X=$T(LIST+I) Q:X="" S X=$P(X,";;",2),R=$P(X,"^",1),B=$P(X,"^",2),C=$P(X,"^",3),^UTILITY($J,R)=B_"^"_C
|
||
|
F I=1:1:6 S X=$P($T(@("LINE"_I)),";;",2,99),@("XBINTEG("_I_")=X")
|
||
|
X XBINTEG(1)
|
||
|
Q
|
||
|
;
|
||
|
LINE1 ;;X XBINTEG(2),XBINTEG(6)
|
||
|
LINE2 ;;S RTN="" F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" W !,RTN ZL @RTN S (BYTE,COUNT)=0 S X=$T(+1),X=$P(X," [ ",1) X XBINTEG(4),XBINTEG(3),XBINTEG(5)
|
||
|
LINE3 ;;F I=2:1 S X=$T(+I) Q:X="" X XBINTEG(4)
|
||
|
LINE4 ;;F J=1:1 S Y=$E(X,J) Q:Y="" S BYTE=BYTE+1,COUNT=COUNT+$A(Y)
|
||
|
LINE5 ;;S B=$P(^(RTN),"^",1),C=$P(^(RTN),"^",2) I B'=BYTE!(C'=COUNT) W " has been modified"
|
||
|
LINE6 ;;K XBINTEG,B,C,I,J,R,X,Y
|
||
|
;
|
||
|
LIST ;
|
||
|
;;XBDH^1015^66897
|
||
|
;;XBDHD^3059^203397
|
||
|
;;XBDHD1^1477^95266
|
||
|
;;XBDHD2^4434^278456
|
||
|
;;XBDHDF^3469^221710
|
||
|
;;XBDHDF1^991^59705
|
||
|
;;XBDHDIP^550^35291
|
||
|
;;XBDHDSP^2728^178325
|
||
|
;;XBDHDSV^2938^188450
|