Tad писал(а): Пример удалён.О как Типа: хороший Tad показал пример, а плохой Galkov сказал, что творчество сие - не заслуживает названия "пример" Маленький ребенок, ударившись о стульчик, на него же и обижается. Правда, это даже не детский сад, а ясли Придется самому выложить ПРИМЕР: Add(MainForm,3872117,154,56) { Width=338 Height=128 Position=1 } Add(MathParse,189973,210,210) { @Hint=#25:Достаточно ОДНОЙ таблэтки| DataCount=3 MathStr="(%1[trunc(%2)+1,trunc(%3)+1]*frac(%2) + %1[trunc(%2)+0,trunc(%3)+1]*(1-frac(%2)))*frac(%3) + (%1[trunc(%2)+1,trunc(%3)+0]*frac(%2) + %1[trunc(%2)+0,trunc(%3)+0]*(1-frac(%2)))*(1-frac(%3))" link(onResult,9574079:doText,[]) link(X1,15525098:Matrix,[(216,194)(160,194)]) link(X2,14749919:reCalc,[]) link(X3,4857045:reCalc,[(230,194)(279,194)]) AddHint(-72,40,168,13,@Hint) } Add(Edit,15837687,210,98) { Left=95 Top=40 Width=60 Text="5.5555" DataType=4 } Add(Edit,1340437,266,98) { Left=160 Top=40 Width=60 Text="9.33333" DataType=4 } Add(Label,15992881,210,56) { Left=120 Top=20 Width=11 Height=17 Caption="X" AddHint(-3,-26,22,13,Caption) } Add(Label,11674701,266,56) { Left=182 Top=20 Width=11 Height=17 Caption="Y" AddHint(0,-27,22,13,Caption) } Add(Label,9574079,266,210) { Left=239 Top=40 Width=44 Height=17 Caption="<пусто>" } Add(Button,6971499,154,210) { Left=21 Top=40 Caption="EXEC" link(onClick,189973:doCalc,[]) } Add(MathParse,4857045,266,147) { DataCount=1 MathStr="min(max(%1,0),19)" Point(reCalc) link(X1,1340437:Text,[]) } Add(MathParse,14749919,210,147) { DataCount=1 MathStr="min(max(%1,0),19)" Point(reCalc) link(X1,15837687:Text,[]) } Add(InlineCode,15525098,154,147) { @Hint=#10:ПРИМЕР для|19:константной матрицы| VarPoints=#6:Matrix| Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|29: THiAsmClass = class(TDebug)|9: private|16: Obj:TMatrix;|36: procedure _SetSize(x,y:integer);|47: procedure _Set(x,y:integer; var Val:TData);|38: function _Get(x,y:integer):TData;|25: function _R:integer;|25: function _C:integer;|8: public|23: constructor Create;|50: procedure Matrix(var _Data:TData; Index:word);|6: end;|0:|14:implementation|0:|21:const Col=21; Row=21;|53: Matr: array[0..Row-1]of array[0..Col-1] of real = (|90: ( 6, 4, 2, 0, -2, -4, -6, -8, -8,-10,-12,-14,-16,-18,-20,-22,-24,-26,-28,-28, 0),|90: ( 9, 7, 5, 3, 1, -1, -3, -5, -5, -7, -9,-11,-13,-15,-17,-19,-21,-23,-25,-25, 0),|90: ( 12, 10, 8, 6, 4, 2, 0, -2, -2, -4, -6, -8,-10,-12,-14,-16,-18,-20,-22,-22, 0),|90: ( 15, 13, 11, 9, 7, 5, 3, 1, 1, -1, -3, -5, -7, -9,-11,-13,-15,-17,-19,-19, 0),|90: ( 18, 16, 14, 12, 10, 8, 6, 4, 4, 2, 0, -2, -4, -6, -8,-10,-12,-14,-16,-16, 0),|90: ( 21, 19, 17, 15, 13, 11, 9, 7, 7, 5, 3, 1, -1, -3, -5, -7, -9,-11,-13,-13, 0),|90: ( 24, 22, 20, 18, 16, 14, 12, 10, 10, 8, 6, 4, 2, 0, -2, -4, -6, -8,-10,-10, 0),|90: ( 27, 25, 23, 21, 19, 17, 15, 13, 13, 11, 9, 7, 5, 3, 1, -1, -3, -5, -7, -7, 0),|90: ( 30, 28, 26, 24, 22, 20, 18, 16, 16, 14, 12, 10, 8, 6, 4, 2, 0, -2, -4, -4, 0),|90: ( 33, 31, 29, 27, 25, 23, 21, 19, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, -1, -1, 0),|90: ( 36, 34, 32, 30, 28, 26, 24, 22, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 2, 0),|90: ( 39, 37, 35, 33, 31, 29, 27, 25, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 5, 0),|90: ( 42, 40, 38, 36, 34, 32, 30, 28, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 8, 0),|90: ( 45, 43, 41, 39, 37, 35, 33, 31, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 11, 0),|90: ( 48, 46, 44, 42, 40, 38, 36, 34, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 14, 0),|90: ( 51, 49, 47, 45, 43, 41, 39, 37, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 17, 0),|90: ( 54, 52, 50, 48, 46, 44, 42, 40, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 20, 0),|90: ( 57, 55, 53, 51, 49, 47, 45, 43, 43, 41, 39, 37, 35, 33, 31, 29, 27, 25, 23, 23, 0),|90: ( 60, 58, 56, 54, 52, 50, 48, 46, 46, 44, 42, 40, 38, 36, 34, 32, 30, 28, 26, 26, 0),|90: ( 63, 61, 59, 57, 55, 53, 51, 49, 49, 47, 45, 43, 41, 39, 37, 35, 33, 31, 29, 29, 0),|89: ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)|88: ); |0:|31:constructor THiAsmClass.Create;|5:begin|12: inherited;|27: Obj._SetSize := _SetSize;|23: Obj._Set := _Set;|23: Obj._Get := _Get;|21: Obj._Rows := _R;|21: Obj._Cols := _C;|4:end;|0:|31:procedure THiAsmClass._SetSize;|5:begin|4:end;|0:|27:procedure THiAsmClass._Set;|5:begin|4:end;|0:|26:function THiAsmClass._Get;|5:begin|44: if(x>=0)and(y>=0)and(x<Col)and(y<Row) then|28: dtReal(Result,Matr[y,x])|22: else dtNull(Result);|4:end;|0:|24:function THiAsmClass._R;|5:begin|16: Result := Row;|4:end;|0:|24:function THiAsmClass._C;|5:begin|16: Result := Col;|4:end;|0:|29:procedure THiAsmClass.Matrix;|5:begin|23: dtMatrix(_Data,@Obj);|4:end;|0:|4:end.| AddHint(-81,-44,112,26,@Hint) }
Потому что, отвечать за слова следует делами, а не соревнованием в остроумии.Что поделаешь - подходы у нас разные ((c) Tad)
|