Make(delphi) ver(4.04 build 185) Add(MainForm,2953706,140,119) { Width=396 Height=287 } Add(InlineCode,510788,245,119) { WorkPoints=#7:doCheck| EventPoints=#6:onTrue|7:onFalse| DataPoints=#7:_data_a|7:_data_b| Code=#15:unit HiAsmUnit;|0:|9:interface|0:|17:uses Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|22: _data_a:THI_Event;|22: _data_b:THI_Event;|21: onTrue:THI_Event;|22: onFalse:THI_Event;|51: procedure doCheck(var _Data:TData; Index:word);|5: end;|0:|14:implementation|30:procedure THiAsmClass.doCheck;|3:var|70: a,b,d,d1,e,r1,f0,m0,m1,b1,f,m5,m6,b6,s,c1,u,rp,ru,mp,mu,d9:Extended;|25: g,y,k0,uu,k9,c:Integer;|40: t,t2,t3,j0,j,k,m,h,h1,ud,a1,m9:Double;|13: tex:string;|2: |38:function jdtkal(f,j,g:Double):Integer;|5:begin|13: f := f+0.5;|34: if (f>= 1) then begin f:= f-1; |10: j:= j+1;|6: end;|23: if (g= 0) then a:= j;|23: if (g= 1) then begin|36: a1:= Trunc((j/36524.25)-51.12264);|26: a := j+1+a1-Trunc(a1/4);|6: end;|14: b := a+1524;|32: c := Trunc((b/365.25)-0.3343);|23: d := Trunc(365.25*c);|26: e := Trunc((b-d)/30.61);|28: d := b-d-Trunc(30.61*e)+f;|11: m := e-1;|14: y := c-4716;|30: if (e> 13.5) then m := m-12;|28: if (m< 2.5) then y := y+1;|16: d1:= Trunc(d);|17: h := 24*(d-d1);|16: h1:= Trunc(h);|24: m9:= Trunc(60*(h-h1));|23: if (h> 23) then begin|14: h1:= h1-24; |12: d1:= d1+1;|6: end;|27: ud:= Trunc(j)mod 7 +1;//?|36: if (h> 23) then begin ud:= ud+1;|12: ud:= ud-1;|6: end;|6:end; |0:|5:begin|36: y := ReadInteger(_Data,_data_a,0);|9: g := 1;|26: if y < 1583 then g := 0;|24: r1 := 4*ArcTan(1)/180;|11: uu := 0; |32: k0 := Trunc((y-1900)*12.3685);|23: t := (y-1899.5)/100;|12: t2 := t*t;|14: t3 := t*t*t;|22: j0 := 2415020+29*k0;|36: f0 := 0.0001178*t2-0.000000155*t3;|33: f0 := f0+0.75933+0.53058868*k0;|34: f0 := f0-0.000837*t-0.000335*t2;|25: m0 := k0*0.08084821133;|36: m0 := 360*(m0-Trunc(m0))+359.2242;|24: m0 := m0-0.0000333*t2;|25: m0 := m0-0.00000347*t3;|32: m1 := k0*7.171366127999999e-2;|36: m1 := 360*(m1-Trunc(m1))+306.0253;|24: m1 := m1+0.0107306*t2;|25: m1 := m1+0.00001236*t3;|25: b1 := k0*0.08519585128;|35: b1 := 360*(b1-Trunc(b1))+21.2964;|24: b1 := b1-0.0016528*t2;|25: b1 := b1-0.00000239*t3;|22: for k9 :=0 to 28 do|9: begin|19: j := j0+14*k9;|25: f := f0+0.765294*k9;|15: k := k9/2;|32: m5:= (m0+k*29.10535608)*r1;|33: m6:= (m1+k*385.81691806)*r1;|33: b6:= (b1+k*390.67050646)*r1;|28: f := f-0.4068*sin(m6);|40: f := f+(0.1734-0.000393*t)*sin(m5);|29: f := f+0.0161*sin(2*m6);|29: f := f+0.0104*sin(2*b6);|30: f := f-0.0074*sin(m5-m6);|30: f := f-0.0051*sin(m5+m6);|29: f := f+0.0021*sin(2*m5);|21: f := f+0.5/1440;|21: j := j+Trunc(f);|21: f := f-Trunc(f);|33: s := 5.19595-0.0048*cos(m5);|28: s := s+0.002*cos(2*m5);|27: s := s-0.3283*cos(m6);|29: s := s-0.006*cos(m5+m6);|30: s := s+0.0041*cos(m5-m6);|24: c1:= 0.207*sin(m5);|30: c1:= c1+0.0024*sin(2*m5);|27: c1:= c1-0.039*sin(m6);|30: c1:= c1+0.0115*sin(2*m6);|31: c1:= c1-0.0073*sin(m5+m6);|31: c1:= c1-0.0067*sin(m5-m6);|30: c1:= c1+0.0117*sin(2*b6);|36: d9:= abs(s*sin(b6)+c1*cos(b6));|32: u := 0.0059+0.0046*cos(m5);|27: u := u-0.0182*cos(m6);|29: u := u+0.0004*cos(2*m6);|30: u := u-0.0005*cos(m5+m6);|19: rp:= 1.2847+u;|19: ru:= 0.7404-u;|30: mp:= (1.5572+u-d9)/0.545;|30: mu:= (1.0129-u-d9)/0.545;|59: if (abs(sin(b6)) > 0.36) or (mp < 0) then tex := '---'|10: else|54: if (uu = 1) then begin tex:= ' Лунное затмение '|9: end|46: else begin tex:= ' Солнечное затмение'|10: end;|20: jdtkal(f,j,g);|16: uu:= uu+1;|28: if (uu=2) then uu:= 0;|29: _hi_OnEvent(onTrue,tex);|8: end;|26: //_hi_OnEvent(onTrue,mu)|0:|4:end;|4:end.| link(onTrue,5508767:doAdd,[]) link(_data_a,8605956:Text,[]) } Add(Edit,8605956,245,63) { Left=20 Top=20 Width=205 Text="2011" } Add(Button,9105266,189,119) { Left=20 Top=45 link(onClick,510788:doCheck,[]) } Add(Memo,5508767,301,119) { Left=20 Top=70 Width=345 Height=180 ScrollBars=3 }