361
LAMPIRAN
A. Flowchart
1. Contoh Flowchart Penempatan Subjek
Gambar 185. Flowchart Penempatan Subjek AB
362
2. Flowchart Reset Status Cell
Gambar 186. Flowchart Tahap Reset Status Cell
3. Contoh Flowchart Perhitungan Nilai Konflik
Gambar 187. Flowchart Perhitungan Nilai
363
364
365
366
367
5. Contoh Flowchart Perhitungan MAP
368
6. Contoh Flowchart Aturan Transisi
369
7. Contoh Flowchart Aturan Posisi
370
B. Program Cell Position Tester
1. Cell Position Tester
Program ini dibuat dan digunakan untuk melihat apakah aturan posisi sudah
benar. Program ini disusun menggunakan bahasa pemrograman Object Pascal dan
dikembanggan menggunakan IDE Lazarus.
Gambar 195.Cell Position Tester
2. Cara Penggunaan
Pertama masukkan terlebih dahulu input letak dari cell parent subjek.
Misalkan ingin mengetahui letak bagian subjek
yang berbelok dari pendekat
ke pendekat . Posisi cell parent subjek di cell ( ), ( ) dan ( ). Dari
pembahasan diketahui aturan posisi sebagai berikut
371
Perhatikan groupbox cell parent input pada program, kotak berada di
paling kiri jendela program. Karena cell parent subjek diketahui melalui 3 cell
berbeda centang kotak kecil bertuliskan cell parent 1 sampai cell parent 3. Setelah
dicentang kotak isian letak cell parent akan aktif. Masukkan letak cell parent pada
kotak, kotak kiri untuk dan kotak kanan untuk .
Gambar 196.Contoh Isian di Groupbox Cell Parent Input
Kemudian beralih ke isian input aturan posisi. Lihat terlebih dahulu
pilihan di sisi kanan atas jendela program. Beri centang pada kotak kecil condition
372
2 has same argument with condition 1 jika kondisi kedua sama dengan kondisi
pertama kecuali tanda pertidaksamaan dan konstan setelah tanda tersebut. pada
contoh kasus kondisi aturan posisi kedua sama dengan kondisi aturan posisi
pertama yaitu ( ) kecuali tanda pertidaksamaan yaitu dan kemudian
konstan setelah tanda yaitu 5 dan 6. Sehingga beri tanda centang pada pilihan
pertama. Pemberian tanda centang akan membuat kotak-kotak isian input untuk
aturan posisi kedua akan nonaktif, hal ini hanya untuk mempercepat pengisisan
input saja supaya tidak mengulang-ulang isian yang sama. Kemudian pada
pilihan yang kedua beri tanda centang jika aturan posisi kedua memiliki kondisi
dengan tanda sama dengan ( ). Pada contoh kasus kondisi pada aturan posisi
kedua memiliki tanda sama dengan yaitu ( ) sehingga beri yanda
centang pada pilihan kedua. Pemberian tanda centang akan mengaktifkan kotak
isian tanda centang pada isian input kondisi 2. Kemudian beri tanda centang pada
pilihan ketiga jika aturan posisi memiliki 3 buah aturan posisi dan sekaligus 3
buah kondisi. Karena pada contoh kasus aturan posisi (66) memiliki tiga aturan
maka beri tanda centang pada pilihan ketiga. Beri centang pada pilihan keempat
jika kondisi ketiga sama dengan kondisi pertama dan kedua kecuali tanda
pertidaksamaan dan konstan setelah tanda tersebut. Karena pada contoh kasus
kondisi ketiga pada aturan ketiga bagian kiri tanda sama dengan kondisi satu dan
dua maka beri tanda centang pada pilihan keempat.
Gambar 197. Contoh Isian di Pilihan Kondisi
Kemudian isikan aturan posisi sekaligus kondisinya pada program dan pilihan
subjek pada groupbox subject type di jendela program kanan bawah, berikut
contoh isian aturan posisi (66) pada program.
373
Gambar 198. Isian Pada Program Untuk Aturan Posisi (66)
Kemudian klik tombol check!. Jendela baru akan muncul menampilkan
output letak bagian subjek berdasarkan aturan posisi subjek dan letak cell parent
dari subjek.
Gambar 199. Contoh Output Program
Setelah jendela output muncul, samakan dengan tabel di bagian
pembahasan. Pada contoh kasus, output yang diberikan oleh program sama
dengan tabel 40.
361
3. Sintax Program
a. Unit1.pas
unit Unit1; {$mode objfpc}{$H+} interface usesClasses, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, inifiles; type { TForm1 } TForm1 = class(TForm) Button1: TButton;Button2: TButton;Button3: TButton; CheckCondition2samesign: TCheckBox;Image1: TImage;
same2: TCheckBox;Subjek1: TCheckBox; CheckCOndition3: TCheckBox; CheckSameArgument1: TCheckBox; CheckSameArgument2: TCheckBox; condition3box: TGroupBox; condition2box: TGroupBox;ConsM2: TEdit;ConsM3: TEdit;
ConsN1: TEdit;ConsN2: TEdit;ConsN3: TEdit;
GroupBox1: TGroupBox;IMA2: TCheckBox;IMA3: TCheckBox; INA1: TCheckBox;IMB2: TCheckBox;IMB3: TCheckBox;
INA2: TCheckBox;INA3: TCheckBox;INB1: TCheckBox;
INB2: TCheckBox;INB3: TCheckBox;JMA2: TCheckBox; JMA3: TCheckBox;JNA1: TCheckBox;JMB2: TCheckBox; JMB3: TCheckBox;JNA2: TCheckBox;JNA3: TCheckBox; JNB1: TCheckBox;JNB2: TCheckBox;JNB3: TCheckBox; MinMA2: TCheckBox;MinMA3: TCheckBox; MinNA1: TCheckBox;MinMB2: TCheckBox; MinMB3: TCheckBox;MinNA2: TCheckBox;
MinNA3: TCheckBox;MinNB1: TCheckBox; MinMC2: TCheckBox;MinMC3: TCheckBox;
MinNB2: TCheckBox;MinNB3: TCheckBox; MinNC1: TCheckBox;MinNC2: TCheckBox; MinNC3: TCheckBox;MMA2: TCheckBox; MMA3: TCheckBox;MNA1: TCheckBox; MMB2: TCheckBox;MMB3: TCheckBox; MNA2: TCheckBox;MNA3: TCheckBox; MNB1: TCheckBox;MNB2: TCheckBox; MNB3: TCheckBox;mpositionrule3: TGroupBox;
NNA2: TCheckBox;NNA3: TCheckBox; NNB2: TCheckBox;NNB3: TCheckBox; npositionrule1: TGroupBox;NMA2: TCheckBox;
NMA3: TCheckBox;NNA1: TCheckBox; NMB2: TCheckBox;NMB3: TCheckBox; NNB1: TCheckBox;npositionrule2: TGroupBox; npositionrule3: TGroupBox;PlusMA2: TCheckBox; PlusMA3: TCheckBox;PlusNA1: TCheckBox; PlusMB2: TCheckBox;PlusMB3: TCheckBox; PlusNA2: TCheckBox;PlusNA3: TCheckBox; PlusNB1: TCheckBox;PlusMC2: TCheckBox; mpositionrule1: TGroupBox;ConsConA3: TEdit;
ConsM1: TEdit;ConsConB2: TEdit; ConsConA2: TEdit;ConsConB1: TEdit; ConsConB3: TEdit;ConsConC2: TEdit;IA2: TCheckBox;
IA3: TCheckBox;IMA1: TCheckBox;IB2: TCheckBox;
IB3: TCheckBox;IMB1: TCheckBox;JA2: TCheckBox;
JA3: TCheckBox;JMA1: TCheckBox;JB2: TCheckBox;
JB3: TCheckBox;JMB1: TCheckBox;
less3: TCheckBox;lessB2: TCheckBox; lessA2: TCheckBox;lessSame3: TCheckBox;
lessSameB2: TCheckBox;lessSameA2: TCheckBox;
MA2: TCheckBox;MA3: TCheckBox; MMA1: TCheckBox;MB2: TCheckBox;MB3: TCheckBox; MMB1: TCheckBox;MinA3: TCheckBox; MinMA1: TCheckBox;MinB2: TCheckBox; MinB3: TCheckBox;MinMB1: TCheckBox; MinC2: TCheckBox;MinC3: TCheckBox; MinMC1: TCheckBox;MinD2: TCheckBox; MinA2: TCheckBox;MinD1: TCheckBox; MinD3: TCheckBox;MinE2: TCheckBox; More3: TCheckBox;MoreB2: TCheckBox; MoreA2: TCheckBox;MoreSame1: TCheckBox;
More1: TCheckBox;lessSame1: TCheckBox;
MinA1: TCheckBox;JA1: TCheckBox; MoreSame3: TCheckBox;MoreSameB2: TCheckBox;
MoreSameA2: TCheckBox;NA1: TCheckBox;
MinB1: TCheckBox;JB1: TCheckBox; NA2: TCheckBox;NA3: TCheckBox;NMA1: TCheckBox;
NB1: TCheckBox;MinC1: TCheckBox;ConsConA1: TEdit; less1: TCheckBox;NB2: TCheckBox;NB3: TCheckBox; NMB1: TCheckBox;PlusA1: TCheckBox; checkcellparent1: TCheckBox; checkcellparent2: TCheckBox; checkcellparent3: TCheckBox; checkcellparent4: TCheckBox; checkcellparent5: TCheckBox; checkcellparent6: TCheckBox; checkcellparent7: TCheckBox; checkcellparent8: TCheckBox; checkcellparent9: TCheckBox;inputi1: TEdit; inputi2: TEdit;
inputi3: TEdit;inputi4: TEdit;inputi5: TEdit;inputi6: TEdit;
inputi7: TEdit;inputi8: TEdit;inputi9: TEdit;inputj1: TEdit;
condition1box:
TGroupBox;GroupCellParent: TGroupBox; inputj2: TEdit;inputj3: TEdit;inputj4: TEdit;inputj5: TEdit;
inputj6: TEdit;inputj7: TEdit;inputj8: TEdit;inputj9: TEdit;
IA1: TCheckBox;MA1: TCheckBox;PlusA3: TCheckBox;
PlusMA1: TCheckBox;PlusB2: TCheckBox; PlusB1: TCheckBox;IB1: TCheckBox; MB1: TCheckBox;PlusB3: TCheckBox; PlusMB1: TCheckBox;PlusC2: TCheckBox; PlusC1: TCheckBox;PlusA2: TCheckBox; PlusC3: TCheckBox;PlusMC1: TCheckBox; PlusD1: TCheckBox;PlusD2: TCheckBox; PlusD3: TCheckBox;PlusE2: TCheckBox; mpositionrule2: TGroupBox;PlusMC3: TCheckBox;
PlusNB2: TCheckBox;PlusNB3: TCheckBox; PlusNC1: TCheckBox;PlusNC2: TCheckBox; PlusNC3: TCheckBox;Subjek2: TCheckBox; Subjek3: TCheckBox;Subjek4: TCheckBox; Subjek5: TCheckBox;Subjek6: TCheckBox; procedure Button1Click(Sender: TObject); procedure checkcellparent1Change(Sender: TObject); procedure checkcellparent2Change(Sender: TObject); procedure checkcellparent3Change(Sender: TObject); procedure checkcellparent4Change(Sender: TObject); procedure checkcellparent5Change(Sender: TObject); procedure checkcellparent6Change(Sender: TObject); procedure checkcellparent7Change(Sender: TObject); procedure checkcellparent8Change(Sender: TObject); procedure checkcellparent9Change(Sender: TObject); procedure CheckCondition2samesignChange(Sender: TObject); procedure CheckCOndition3Change(Sender: TObject); procedure CheckSameArgument1Change(Sender: TObject); procedure CheckSameArgument2Change(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure inputparent1; procedure inputparent2; procedure inputparent3; procedure inputparent4; procedure inputparent5; procedure inputparent6; procedure inputparent7; procedure inputparent8; procedure inputparent9; procedure kondisipertama; procedure kondisikedua; procedure kondisiketiga; procedure posisim1; procedure posisin1; procedure posisim2; procedure posisin2; procedure posisim3; procedure posisin3; private { private declarations } public { public declarations } end; var Form1: TForm1; i,j:array [1..9] of integer; posm,posn:array [1..9,1..10,1..3] of integer; y,x,a1,a2,a3,m,n:integer; kondisi1,kondisi2,kondisi3:boolean; savefile:TIniFile; implementation uses unit2; {$R *.lfm} { TForm1 } procedure TForm1.checkcellparent1Change(Sender: TObject); begin if checkcellparent1.Checked=true then begin inputi1.Enabled:=true; inputj1.Enabled:=true; end; if checkcellparent1.Checked=false then begin inputi1.Enabled:=false; inputj1.Enabled:=false; end;end; procedure TForm1.checkcellparent2Change(Sender: TObject); begin if checkcellparent2.Checked=true then begin inputi2.Enabled:=true; inputj2.Enabled:=true; checkcellparent1.Checked:=true; end; if checkcellparent2.Checked=false then begin inputi2.Enabled:=false; inputj2.Enabled:=false; checkcellparent1.Checked:=false; end;end; procedure TForm1.checkcellparent3Change(Sender: TObject); begin if checkcellparent3.Checked=true then begin inputi3.Enabled:=true; inputj3.Enabled:=true; checkcellparent1.Checked:=true; checkcellparent2.Checked:=true; end;
362
if checkcellparent3.Checked=false then begin inputi3.Enabled:=false; inputj3.Enabled:=false; checkcellparent1.Checked:=false; checkcellparent2.Checked:=false; end;end; procedure TForm1.checkcellparent4Change(Sender: TObject); begin if checkcellparent4.Checked=true then begin inputi4.Enabled:=true; inputj4.Enabled:=true; checkcellparent1.Checked:=true; checkcellparent2.Checked:=true; checkcellparent3.Checked:=true; end; if checkcellparent4.Checked=false then begin inputi4.Enabled:=false; inputj4.Enabled:=false; checkcellparent1.Checked:=false; checkcellparent2.Checked:=false; checkcellparent3.Checked:=false; end; end; procedure TForm1.checkcellparent5Change(Sender: TObject); begin if checkcellparent5.Checked=true then begin inputi5.Enabled:=true; inputj5.Enabled:=true; checkcellparent1.Checked:=true; checkcellparent2.Checked:=true; checkcellparent3.Checked:=true; checkcellparent4.Checked:=true; end; if checkcellparent5.Checked=false then begin inputi5.Enabled:=false; inputj5.Enabled:=false; checkcellparent1.Checked:=false; checkcellparent2.Checked:=false; checkcellparent3.Checked:=false; checkcellparent4.Checked:=false; end; end; procedure TForm1.checkcellparent6Change(Sender: TObject); begin if checkcellparent6.Checked=true then begin inputi6.Enabled:=true; inputj6.Enabled:=true; checkcellparent1.Checked:=true; checkcellparent2.Checked:=true; checkcellparent3.Checked:=true; checkcellparent4.Checked:=true; checkcellparent5.Checked:=true; end; if checkcellparent6.Checked=false then begin inputi6.Enabled:=false; inputj6.Enabled:=false; checkcellparent1.Checked:=false; checkcellparent2.Checked:=false; checkcellparent3.Checked:=false; checkcellparent4.Checked:=false; checkcellparent5.Checked:=false; end; end; procedure TForm1.checkcellparent7Change(Sender: TObject); begin if checkcellparent7.Checked=true then begin inputi7.Enabled:=true; inputj7.Enabled:=true; checkcellparent1.Checked:=true; checkcellparent2.Checked:=true; checkcellparent3.Checked:=true; checkcellparent4.Checked:=true; checkcellparent5.Checked:=true; checkcellparent6.Checked:=true; end; if checkcellparent7.Checked=false then begin inputi7.Enabled:=false; inputj7.Enabled:=false; checkcellparent1.Checked:=false; checkcellparent2.Checked:=false; checkcellparent3.Checked:=false; checkcellparent4.Checked:=false; checkcellparent5.Checked:=false; checkcellparent6.Checked:=false; end; end; procedure TForm1.checkcellparent8Change(Sender: TObject); begin if checkcellparent8.Checked=true then begin inputi8.Enabled:=true; inputj8.Enabled:=true; checkcellparent1.Checked:=true; checkcellparent2.Checked:=true; checkcellparent3.Checked:=true; checkcellparent4.Checked:=true; checkcellparent5.Checked:=true; checkcellparent6.Checked:=true; checkcellparent7.Checked:=true; end; if checkcellparent8.Checked=false then begin inputi8.Enabled:=false; inputj8.Enabled:=false; checkcellparent1.Checked:=false; checkcellparent2.Checked:=false; checkcellparent3.Checked:=false; checkcellparent4.Checked:=false; checkcellparent5.Checked:=false; checkcellparent6.Checked:=false; checkcellparent7.Checked:=false; end; end; procedure TForm1.checkcellparent9Change(Sender: TObject); begin if checkcellparent9.Checked=true then begin inputi9.Enabled:=true; inputj9.Enabled:=true; checkcellparent1.Checked:=true; checkcellparent2.Checked:=true; checkcellparent3.Checked:=true; checkcellparent4.Checked:=true; checkcellparent5.Checked:=true; checkcellparent6.Checked:=true; checkcellparent7.Checked:=true; checkcellparent8.Checked:=true; end; if checkcellparent9.Checked=false then begin inputi9.Enabled:=false; inputj9.Enabled:=false; checkcellparent1.Checked:=false; checkcellparent2.Checked:=false; checkcellparent3.Checked:=false; checkcellparent4.Checked:=false; checkcellparent5.Checked:=false; checkcellparent6.Checked:=false; checkcellparent7.Checked:=false; checkcellparent8.Checked:=false; end; end; procedure TForm1.CheckCondition2samesignChange( Sender: TObject); begin if (checkcondition2samesign.Checked=true) and (checkcondition3.Checked=false) then beginsame2.Enabled:=true; end;
if
(checkcondition2samesign.Checked=false) and (checkcondition3.Checked=false) then begin
same2.Enabled:=false; end;
if
(checkcondition2samesign.Checked=true) and (checkcondition3.Checked=true) then begin same2.Enabled:=true; plusa2.Enabled:=false; mina2.Enabled:=false; conscona2.Enabled:=false; moresamea2.Enabled:=false; morea2.Enabled:=false; lesssamea2.Enabled:=false; lessa2.Enabled:=false; end; if (checkcondition2samesign.Checked=false) and (checkcondition3.Checked=true) then begin same2.Enabled:=false; plusa2.Enabled:=true; mina2.Enabled:=true; conscona2.Enabled:=true; moresamea2.Enabled:=true; morea2.Enabled:=true; lesssamea2.Enabled:=true; lessa2.Enabled:=true; end; end; procedure TForm1.CheckCOndition3Change(Sender: TObject); begin if (checkcondition3.Checked=true) and (checkcondition2samesign.Checked=false) then begin plusa2.Enabled:=true; mina2.Enabled:=true; conscona2.Enabled:=true; moresamea2.Enabled:=true; morea2.Enabled:=true; lesssamea2.Enabled:=true; lessa2.Enabled:=true; same2.Enabled:=false; condition3box.Enabled:=true; mpositionrule3.Enabled:=true; npositionrule3.Enabled:=true; checksameargument2.Enabled:=true; end; if (checkcondition3.Checked=false) and (checkcondition2samesign.Checked=true) then begin plusa2.Enabled:=false; mina2.Enabled:=false; conscona2.Enabled:=false; moresamea2.Enabled:=false; morea2.Enabled:=false; lesssamea2.Enabled:=false; lessa2.Enabled:=false; same2.Enabled:=true; condition3box.Enabled:=false; mpositionrule3.Enabled:=false; npositionrule3.Enabled:=false; checksameargument2.Enabled:=false; end; if (checkcondition3.Checked=true) and (checkcondition2samesign.Checked=true) then begin plusa2.Enabled:=false; mina2.Enabled:=false; conscona2.Enabled:=false; moresamea2.Enabled:=false; morea2.Enabled:=false; lesssamea2.Enabled:=false; lessa2.Enabled:=false; same2.Enabled:=true; condition3box.Enabled:=true; mpositionrule3.Enabled:=true; npositionrule3.Enabled:=true; checksameargument2.Enabled:=true; end;
363
if (checkcondition3.Checked=false) and (checkcondition2samesign.Checked=false) then begin plusa2.Enabled:=false; mina2.Enabled:=false; conscona2.Enabled:=false; moresamea2.Enabled:=false; morea2.Enabled:=false; lesssamea2.Enabled:=false; lessa2.Enabled:=false; same2.Enabled:=false; condition3box.Enabled:=false; mpositionrule3.Enabled:=false; npositionrule3.Enabled:=false; checksameargument2.Enabled:=false; end; end; procedure TForm1.CheckSameArgument1Change(Sen der: TObject); begin if checksameargument1.Checked=true then begin plusb2.Enabled:=false; minb2.Enabled:=false; ia2.Enabled:=false; ja2.Enabled:=false; ma2.Enabled:=false; na2.Enabled:=false; plusc2.Enabled:=false; minc2.Enabled:=false; ib2.Enabled:=false; jb2.Enabled:=false; mb2.Enabled:=false; nb2.Enabled:=false; plusd2.Enabled:=false; mind2.Enabled:=false; consconb2.Enabled:=false; end; if checksameargument1.Checked=false then begin plusb2.Enabled:=true; minb2.Enabled:=true; ia2.Enabled:=true; ja2.Enabled:=true; ma2.Enabled:=true; na2.Enabled:=true; plusc2.Enabled:=true; minc2.Enabled:=true; ib2.Enabled:=true; jb2.Enabled:=true; mb2.Enabled:=true; nb2.Enabled:=true; plusd2.Enabled:=true; mind2.Enabled:=true; consconb2.Enabled:=true; end; end; procedure TForm1.CheckSameArgument2Change(Sen der: TObject); begin if checksameargument2.Checked=true then begin plusa3.Enabled:=false; mina3.Enabled:=false; ia3.Enabled:=false; ja3.Enabled:=false; ma3.Enabled:=false; na3.Enabled:=false; plusb3.Enabled:=false; minb3.Enabled:=false; ib3.Enabled:=false; jb3.Enabled:=false; mb3.Enabled:=false; nb3.Enabled:=false; plusc3.Enabled:=false; minc3.Enabled:=false; conscona3.Enabled:=false; end; if checksameargument2.Checked=false then begin plusa3.Enabled:=true; mina3.Enabled:=true; ia3.Enabled:=true; ja3.Enabled:=true; ma3.Enabled:=true; na3.Enabled:=true; plusb3.Enabled:=true; minb3.Enabled:=true; ib3.Enabled:=true; jb3.Enabled:=true; mb3.Enabled:=true; nb3.Enabled:=true; plusc3.Enabled:=true; minc3.Enabled:=true; conscona3.Enabled:=true; end; end; procedure TForm1.FormCreate(Sender: TObject); begin form1.Image1.Picture.LoadFromFile(applica tion.Location+'Aset/background_1.jpg'); form1.Icon.LoadFromFile(application.Locati on+'Aset/icon.ico'); end; procedure TForm1.inputparent1; begin i[1]:=strtoint(inputi1.Text); j[1]:=strtoint(inputj1.Text); end; procedure TForm1.inputparent2; begin i[2]:=strtoint(inputi2.Text); j[2]:=strtoint(inputj2.Text); end; procedure TForm1.inputparent3; begin i[3]:=strtoint(inputi3.Text); j[3]:=strtoint(inputj3.Text); end; procedure TForm1.inputparent4; begin i[4]:=strtoint(inputi4.Text); j[4]:=strtoint(inputj4.Text); end; procedure TForm1.inputparent5; begin i[5]:=strtoint(inputi5.Text); j[5]:=strtoint(inputj5.Text); end; procedure TForm1.inputparent6; begin i[6]:=strtoint(inputi6.Text); j[6]:=strtoint(inputj6.Text); end; procedure TForm1.inputparent7; begin i[7]:=strtoint(inputi7.Text); j[7]:=strtoint(inputj7.Text); end; procedure TForm1.inputparent8; begin i[8]:=strtoint(inputi8.Text); j[8]:=strtoint(inputj8.Text); end; procedure TForm1.inputparent9; begin i[9]:=strtoint(inputi9.Text); j[9]:=strtoint(inputj9.Text); end; procedure TForm1.kondisipertama; var a,b,c,d:integer; begin beginif ia1.Checked=true then a:=i[x]; if ja1.Checked=true then a:=j[x]; if ma1.Checked=true then a:=m; if na1.Checked=true then a:=n; end;
begin
if plusa1.Checked=true then a:=a;
if mina1.Checked=true then a:=-a; end;
begin
if ib1.Checked=true then b:=i[x]; if jb1.Checked=true then b:=j[x]; if mb1.Checked=true then b:=m; if nb1.Checked=true then b:=n; end; begin if plusb1.Checked=true then b:=b; if minb1.Checked=true then b:=-b; end; begin c:=strtoint(conscona1.Text); if plusc1.Checked=true then c:=c; if minc1.Checked=true then c:=-c; end; begin a1:=a+b+c; end; begin d:=strtoint(consconb1.Text); if plusd1.Checked=true then d:=d; if mind1.Checked=true then d:=-d; end; //= nilai kondisi 1 ==================================[ begin if moresame1.Checked=true then begin
if a1>=d then kondisi1:=true else kondisi1:=false; end;
if more1.Checked=true then begin
if a1>d then kondisi1:=true else kondisi1:=false; end;
if lesssame1.Checked=true then begin
if a1<=d then kondisi1:=true else kondisi1:=false; end;
if less1.Checked=true then begin
if a1<d then kondisi1:=true else kondisi1:=false; end; end; //================================== ============] end; procedure TForm1.kondisikedua; var a,b,c,d,d1:integer; kondisi2a,kondisi2b:boolean; begin
// jika argument tidak sama ================================= if checksameargument1.Checked=false then begin
begin
if ia2.Checked=true then a:=i[x]; if ja2.Checked=true then a:=j[x]; if ma2.Checked=true then a:=m; if na2.Checked=true then a:=n; end;
begin
if plusb2.Checked=true then a:=a; if minb2.Checked=true then a:=-a; end;
begin
if ib2.Checked=true then b:=i[x]; if jb2.Checked=true then b:=j[x]; if mb2.Checked=true then b:=m; if nb2.Checked=true then b:=n; end; begin if plusc2.Checked=true then b:=b; if minc2.Checked=true then b:=-b; end; begin c:=strtoint(consconb2.Text); if plusd2.Checked=true then c:=c; if mind2.Checked=true then c:=-c; end; begin a2:=a+b+c; end; end;
364
//================================== =============
//= jika argument sama ====================
if checksameargument1.Checked=true then begin
begin
if ia1.Checked=true then a:=i[x]; if ja1.Checked=true then a:=j[x]; if ma1.Checked=true then a:=m; if na1.Checked=true then a:=n; end;
begin
if plusa1.Checked=true then a:=a; if mina1.Checked=true then a:=-a; end;
begin
if ib1.Checked=true then b:=i[x]; if jb1.Checked=true then b:=j[x]; if mb1.Checked=true then b:=m; if nb1.Checked=true then b:=n; end; begin if plusb1.Checked=true then b:=b; if minb1.Checked=true then b:=-b; end; begin c:=strtoint(conscona1.Text); if plusc1.Checked=true then c:=c; if minc1.Checked=true then c:=-c; end; begin a2:=a+b+c; end; end; //================================== ============= begin d:=strtoint(consconc2.Text); if pluse2.Checked=true then d:=d; if mine2.Checked=true then d:=-d; end; if (checkcondition3.Checked=true) and (checkcondition2samesign.Checked=false) then begin d1:=strtoint(conscona2.Text); if plusa2.Checked=true then d1:=d1; if mina2.Checked=true then d1:=-d1; end;
//= nilai kondisi 2 jika hanya 2 kondisi ==============
if checkcondition3.Checked=false then begin
if moresameb2.Checked=true then begin
if a2>=d then kondisi2:=true else kondisi2:=false; end;
if moreb2.Checked=true then begin
if a2>d then kondisi2:=true else kondisi2:=false; end;
if lesssameb2.Checked=true then begin
if a2<=d then kondisi2:=true else kondisi2:=false; end;
if lessb2.Checked=true then begin
if a2<d then kondisi2:=true else kondisi2:=false; end;
end;
//================================== =============
//== jika 3 kondisi, kondisi 2 tandanya sama dengan ====== if (checkcondition3.Checked=true) and (checkcondition2samesign.Checked=true) then begin if a2=d then kondisi2:=true else kondisi2:=false; end;
//=== jika ada 3 kondisi ================ if (checkcondition3.Checked=true) and (checkcondition2samesign.Checked=false) then begin if moresamea2.Checked=true then begin if moresameb2.Checked=true then begin
if (d1>=a2) and (a2>=d) then kondisi2:=true
else kondisi2:=false; end;
if moreb2.Checked=true then begin
if (d1>=a2) and (a2>d) then kondisi2:=true
else kondisi2:=false; end;
if lesssameb2.Checked=true then begin
if (d1>=a2) and (a2<=d) then kondisi2:=true
else kondisi2:=false; end;
if lessb2.Checked=true then begin
if (d1>=a2) and (a2<d) then kondisi2:=true else kondisi2:=false; end; end; //--- if morea2.Checked=true then begin if moresameb2.Checked=true then begin
if (d1>a2) and (a2>=d) then kondisi2:=true
else kondisi2:=false; end;
if moreb2.Checked=true then begin
if (d1>a2) and (a2>d) then kondisi2:=true
else kondisi2:=false; end;
if lesssameb2.Checked=true then begin
if (d1>a2) and (a2<=d) then kondisi2:=true
else kondisi2:=false; end;
if lessb2.Checked=true then begin
if (d1>a2) and (a2<d) then kondisi2:=true else kondisi2:=false; end; end; //--- if lesssamea2.Checked=true then begin if moresameb2.Checked=true then begin
if (d1<=a2) and (a2>=d) then kondisi2:=true
else kondisi2:=false; end;
if moreb2.Checked=true then begin
if (d1<=a2) and (a2>d) then kondisi2:=true
else kondisi2:=false; end;
if lesssameb2.Checked=true then begin
if (d1<=a2) and (a2<=d) then kondisi2:=true
else kondisi2:=false; end;
if lessb2.Checked=true then begin
if (d1<=a2) and (a2<d) then kondisi2:=true else kondisi2:=false; end; end; //--- if lessa2.Checked=true then begin if moresameb2.Checked=true then begin
if (d1<a2) and (a2>=d) then kondisi2:=true
else kondisi2:=false; end;
if moreb2.Checked=true then begin
if (d1<a2) and (a2>d) then kondisi2:=true
else kondisi2:=false; end;
if lesssameb2.Checked=true then begin
if (d1<a2) and (a2<=d) then kondisi2:=true
else kondisi2:=false; end;
if lessb2.Checked=true then begin
if (d1<a2) and (a2<d) then kondisi2:=true else kondisi2:=false; end; end; end; end; procedure TForm1.kondisiketiga; var a,b,c,d:integer; begin
//=== jika argument tidak sama =============
if checksameargument2.Checked=false then begin
begin
if ia3.Checked=true then a:=i[x]; if ja3.Checked=true then a:=j[x]; if ma3.Checked=true then a:=m; if na3.Checked=true then a:=n; end;
begin
if plusa3.Checked=true then a:=a; if mina3.Checked=true then a:=-a; end;
begin
if ib3.Checked=true then b:=i[x]; if jb3.Checked=true then b:=j[x]; if mb3.Checked=true then b:=m; if nb3.Checked=true then b:=n; end; begin if plusb3.Checked=true then b:=b; if minb3.Checked=true then b:=-b; end; begin c:=strtoint(conscona3.Text); if plusc3.Checked=true then c:=c; if minc3.Checked=true then c:=-c; end; begin a3:=a+b+c; end; end;
//=== jika argumen sama ====================
if checksameargument2.Checked=true then begin
begin
if ia1.Checked=true then a:=i[x]; if ja1.Checked=true then a:=j[x]; if ma1.Checked=true then a:=m; if na1.Checked=true then a:=n; end;
begin
if plusa1.Checked=true then a:=a; if mina1.Checked=true then a:=-a; end;
begin
if ib1.Checked=true then b:=i[x]; if jb1.Checked=true then b:=j[x]; if mb1.Checked=true then b:=m; if nb1.Checked=true then b:=n; end; begin if plusb1.Checked=true then b:=b; if minb1.Checked=true then b:=-b; end; begin c:=strtoint(conscona1.Text); if plusc1.Checked=true then c:=c; if minc1.Checked=true then c:=-c; end; begin a3:=a+b+c;
365
end; end; //================================== ============= begin d:=strtoint(consconb3.Text); if plusd3.Checked=true then d:=d; if mind3.Checked=true then d:=-d; end;//=== cari nilai kondisi 3 =================== begin
if moresame3.Checked=true then begin
if a3>=d then kondisi3:=true else kondisi3:=false; end;
if more3.Checked=true then begin
if a3>d then kondisi3:=true else kondisi3:=false; end;
if lesssame3.Checked=true then begin
if a3<=d then kondisi3:=true else kondisi3:=false; end;
if less3.Checked=true then begin
if a3<d then kondisi3:=true else kondisi3:=false; end; end; //================================== ============= end; procedure TForm1.posisim1; var a,b,c:integer; begin begin
if ima1.Checked=true then a:=i[x]; if jma1.Checked=true then a:=j[x]; if mma1.Checked=true then a:=m; if nma1.Checked=true then a:=n; if imb1.Checked=true then b:=i[x]; if jmb1.Checked=true then b:=j[x]; if mmb1.Checked=true then b:=m; if nmb1.Checked=true then b:=n; c:=strtoint(consm1.Text); end; begin
if plusma1.Checked=true then a:=a; if minma1.Checked=true then a:=-a; if plusmb1.Checked=true then b:=b; if minmb1.Checked=true then b:=-b; if plusmc1.Checked=true then c:=c; if minmc1.Checked=true then c:=-c; end; begin posm[x,m,n]:=a+b+c; end; end; procedure TForm1.posisin1; var a,b,c:integer; begin begin
if ina1.Checked=true then a:=i[x]; if jna1.Checked=true then a:=j[x]; if mna1.Checked=true then a:=m; if nna1.Checked=true then a:=n; if inb1.Checked=true then b:=i[x]; if jnb1.Checked=true then b:=j[x]; if mnb1.Checked=true then b:=m; if nnb1.Checked=true then b:=n; c:=strtoint(consn1.Text); end; begin
if plusna1.Checked=true then a:=a; if minna1.Checked=true then a:=-a; if plusnb1.Checked=true then b:=b; if minnb1.Checked=true then b:=-b; if plusnc1.Checked=true then c:=c; if minnc1.Checked=true then c:=-c; end; begin posn[x,m,n]:=a+b+c; end; end; procedure TForm1.posisim2; var a,b,c:integer; begin begin
if ima2.Checked=true then a:=i[x]; if jma2.Checked=true then a:=j[x]; if mma2.Checked=true then a:=m; if nma2.Checked=true then a:=n; if imb2.Checked=true then b:=i[x]; if jmb2.Checked=true then b:=j[x]; if mmb2.Checked=true then b:=m; if nmb2.Checked=true then b:=n; c:=strtoint(consm2.Text); end; begin
if plusma2.Checked=true then a:=a; if minma2.Checked=true then a:=-a; if plusmb2.Checked=true then b:=b; if minmb2.Checked=true then b:=-b; if plusmc2.Checked=true then c:=c; if minmc2.Checked=true then c:=-c; end; begin posm[x,m,n]:=a+b+c; end; end; procedure TForm1.posisin2; var a,b,c:integer; begin begin
if ina2.Checked=true then a:=i[x]; if jna2.Checked=true then a:=j[x]; if mna2.Checked=true then a:=m; if nna2.Checked=true then a:=n; if inb2.Checked=true then b:=i[x]; if jnb2.Checked=true then b:=j[x]; if mnb2.Checked=true then b:=m; if nnb2.Checked=true then b:=n; c:=strtoint(consn2.Text); end; begin
if plusna2.Checked=true then a:=a; if minna2.Checked=true then a:=-a; if plusnb2.Checked=true then b:=b; if minnb2.Checked=true then b:=-b; if plusnc2.Checked=true then c:=c; if minnc2.Checked=true then c:=-c; end; begin posn[x,m,n]:=a+b+c; end; end; procedure TForm1.posisim3; var a,b,c:integer; begin begin
if ima3.Checked=true then a:=i[x]; if jma3.Checked=true then a:=j[x]; if mma3.Checked=true then a:=m; if nma3.Checked=true then a:=n; if imb3.Checked=true then b:=i[x]; if jmb3.Checked=true then b:=j[x]; if mmb3.Checked=true then b:=m; if nmb3.Checked=true then b:=n; c:=strtoint(consm3.Text); end; begin
if plusma3.Checked=true then a:=a; if minma3.Checked=true then a:=-a; if plusmb3.Checked=true then b:=b; if minmb3.Checked=true then b:=-b; if plusmc3.Checked=true then c:=c; if minmc3.Checked=true then c:=-c; end; begin posm[x,m,n]:=a+b+c; end; end; procedure TForm1.posisin3; var a,b,c:integer; begin begin
if ina3.Checked=true then a:=i[x]; if jna3.Checked=true then a:=j[x]; if mna3.Checked=true then a:=m; if nna3.Checked=true then a:=n; if inb3.Checked=true then b:=i[x]; if jnb3.Checked=true then b:=j[x]; if mnb3.Checked=true then b:=m; if nnb3.Checked=true then b:=n; c:=strtoint(consn3.Text); end; begin
if plusna3.Checked=true then a:=a; if minna3.Checked=true then a:=-a; if plusnb3.Checked=true then b:=b; if minnb3.Checked=true then b:=-b; if plusnc3.Checked=true then c:=c; if minnc3.Checked=true then c:=-c; end; begin posn[x,m,n]:=a+b+c; end; end; procedure TForm1.Button1Click(Sender: TObject); var a,b,c,d:integer; begin
//== setting nilai vaiabel awal =============================== begin for a:=1 to 9 do begin i[a]:=0; j[a]:=0; end; for b:=1 to 9 do begin for c:=1 to 10 do begin for d:=1 to 3 do begin posm[b,c,d]:=0; posn[b,c,d]:=0; end; end; end; y:=0;x:=0; a1:=0;a2:=0;a3:=0; m:=0;n:=0; kondisi1:=false;kondisi2:=false;kondisi3:=fal se; end;
//= baca input cell parent ====== begin if checkcellparent1.Checked=true then begin form1.inputparent1;y:=1; end; if checkcellparent2.Checked=true then begin form1.inputparent2;y:=2; end; if checkcellparent3.Checked=true then begin form1.inputparent3;y:=3; end; if checkcellparent4.Checked=true then begin form1.inputparent4;y:=4; end; if checkcellparent5.Checked=true then begin form1.inputparent5;y:=5; end; if checkcellparent6.Checked=true then begin form1.inputparent6;y:=6; end; if checkcellparent7.Checked=true then begin form1.inputparent7;y:=7; end; if checkcellparent8.Checked=true then begin form1.inputparent8;y:=8; end; if checkcellparent9.Checked=true then begin form1.inputparent9;y:=9; end; end; //= cari posisi ================================ begin for x:=1 to y do begin
366
for m:=1 to 10 do begin for n:=1 to 3 do begin form1.kondisipertama; form1.kondisikedua; if checkcondition3.Checked=true then begin form1.kondisiketiga; end; begin if kondisi1=true then begin form1.posisim1; form1.posisin1; end; if kondisi2=true then begin form1.posisim2; form1.posisin2; end; if kondisi3=true then begin form1.posisim3; form1.posisin3; end;end;end;end;end;end; begin form2.Show; end;end; end.b. Unit2.pas
unit Unit2; {$mode objfpc}{$H+} interface usesClasses, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,Grids, ExtCtrls, StdCtrls; type { TForm2 } TForm2 = class(TForm) PageControl1: TPageControl; StringGrid2: TStringGrid;StringGrid1: TStringGrid; StringGrid3: TStringGrid;StringGrid4: TStringGrid; StringGrid5: TStringGrid;StringGrid6: TStringGrid; TabSheet1: TTabSheet;TabSheet2: TTabSheet; TabSheet3: TTabSheet;TabSheet4: TTabSheet; TabSheet5: TTabSheet;TabSheet6: TTabSheet;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure posisisubjek1;procedure posisisubjek2;
procedure posisisubjek3; procedure posisisubjek4;
procedure posisisubjek5;procedure posisisubjek6;
procedure FormShow(Sender: TObject); private { private declarations } public { public declarations } end; var Form2: TForm2; implementation uses unit1; {$R *.lfm} { TForm2 } procedure TForm2.posisisubjek1; begin tabsheet1.TabVisible:=true; StringGrid1.Cells[0,1]:='(1,1)'; StringGrid1.Cells[0,2]:='(2,1)'; StringGrid1.Cells[0,3]:='(1,2)'; StringGrid1.Cells[0,4]:='(2,2)'; if form1.checkcellparent1.Checked=true then begin StringGrid1.Cells[1,1]:='('+inttostr(posm[1,1, 1])+','+ inttostr(posn[1,1,1])+')'; StringGrid1.Cells[1,2]:='('+IntToStr(posm[1,2 ,1])+','+ Inttostr(posn[1,2,1])+')'; StringGrid1.Cells[1,3]:='('+inttostr(posm[1,1, 2])+','+ inttostr(posn[1,1,2])+')'; StringGrid1.Cells[1,4]:='('+IntToStr(posm[1,2 ,2])+','+ Inttostr(posn[1,2,2])+')'; end; end; procedure TForm2.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin kondisi1:=false;kondisi2:=false;kondisi3:=fal se; end; procedure TForm2.posisisubjek2; begin tabsheet2.TabVisible:=true; StringGrid2.Cells[0,1]:='(1,1)'; StringGrid2.Cells[0,2]:='(2,1)'; StringGrid2.Cells[0,3]:='(3,1)'; StringGrid2.Cells[0,4]:='(1,2)'; StringGrid2.Cells[0,5]:='(2,2)'; StringGrid2.Cells[0,6]:='(3,2)'; begin if form1.checkcellparent1.Checked=true then begin StringGrid2.Cells[1,1]:='('+inttostr(posm[1,1, 1])+','+ inttostr(posn[1,1,1])+')'; StringGrid2.Cells[1,2]:='('+IntToStr(posm[1,2 ,1])+','+ Inttostr(posn[1,2,1])+')'; StringGrid2.Cells[1,3]:='('+IntToStr(posm[1,3 ,1])+','+ IntToStr(posn[1,3,1])+')'; StringGrid2.Cells[1,4]:='('+inttostr(posm[1,1, 2])+','+ inttostr(posn[1,1,2])+')'; StringGrid2.Cells[1,5]:='('+IntToStr(posm[1,2 ,2])+','+ Inttostr(posn[1,2,2])+')'; StringGrid2.Cells[1,6]:='('+IntToStr(posm[1,3 ,2])+','+ IntToStr(posn[1,3,2])+')'; end; if form1.checkcellparent2.Checked=true then begin StringGrid2.Cells[2,1]:='('+inttostr(posm[2,1, 1])+','+ inttostr(posn[2,1,1])+')'; StringGrid2.Cells[2,2]:='('+IntToStr(posm[2,2 ,1])+','+ Inttostr(posn[2,2,1])+')'; StringGrid2.Cells[2,3]:='('+IntToStr(posm[2,3 ,1])+','+ IntToStr(posn[2,3,1])+')'; StringGrid2.Cells[2,4]:='('+inttostr(posm[2,1, 2])+','+ inttostr(posn[2,1,2])+')'; StringGrid2.Cells[2,5]:='('+IntToStr(posm[2,2 ,2])+','+ Inttostr(posn[2,2,2])+')'; StringGrid2.Cells[2,6]:='('+IntToStr(posm[2,3 ,2])+','+ IntToStr(posn[2,3,2])+')'; end;end;end; procedure TForm2.posisisubjek3; begin tabsheet3.TabVisible:=true; StringGrid3.Cells[0,1]:='(1,1)'; StringGrid3.Cells[0,2]:='(2,1)'; StringGrid3.Cells[0,3]:='(3,1)'; StringGrid3.Cells[0,4]:='(4,1)'; StringGrid3.Cells[0,5]:='(5,1)'; StringGrid3.Cells[0,6]:='(1,2)'; StringGrid3.Cells[0,7]:='(2,2)'; StringGrid3.Cells[0,8]:='(3,2)'; StringGrid3.Cells[0,9]:='(4,2)'; StringGrid3.Cells[0,10]:='(5,2)'; begin if form1.checkcellparent1.Checked=true then begin StringGrid3.Cells[1,1]:='('+inttostr(posm[1,1, 1])+','+inttostr(posn[1,1,1])+')'; StringGrid3.Cells[1,2]:='('+IntToStr(posm[1,2 ,1])+','+Inttostr(posn[1,2,1])+')'; StringGrid3.Cells[1,3]:='('+IntToStr(posm[1,3 ,1])+','+IntToStr(posn[1,3,1])+')'; StringGrid3.Cells[1,4]:='('+IntToStr(posm[1,4 ,1])+','+Inttostr(posn[1,4,1])+')'; StringGrid3.Cells[1,5]:='('+IntToStr(posm[1,5 ,1])+','+IntToStr(posn[1,5,1])+')'; StringGrid3.Cells[1,6]:='('+IntToStr(posm[1,1 ,2])+','+IntToStr(posn[1,1,2])+')'; StringGrid3.Cells[1,7]:='('+IntToStr(posm[1,2 ,2])+','+IntToStr(posn[1,2,2])+')'; StringGrid3.Cells[1,8]:='('+IntToStr(posm[1,3 ,2])+','+IntToStr(posn[1,3,2])+')'; StringGrid3.Cells[1,9]:='('+IntToStr(posm[1,4 ,2])+','+IntToStr(posn[1,4,2])+')'; StringGrid3.Cells[1,10]:='('+IntToStr(posm[1, 5,2])+','+IntToStr(posn[1,5,2])+')'; end; if form1.checkcellparent2.Checked=true then begin StringGrid3.Cells[2,1]:='('+inttostr(posm[2,1, 1])+','+inttostr(posn[2,1,1])+')'; StringGrid3.Cells[2,2]:='('+IntToStr(posm[2,2 ,1])+','+Inttostr(posn[2,2,1])+')'; StringGrid3.Cells[2,3]:='('+IntToStr(posm[2,3 ,1])+','+IntToStr(posn[2,3,1])+')'; StringGrid3.Cells[2,4]:='('+IntToStr(posm[2,4 ,1])+','+Inttostr(posn[2,4,1])+')'; StringGrid3.Cells[2,5]:='('+IntToStr(posm[2,5 ,1])+','+IntToStr(posn[2,5,1])+')'; StringGrid3.Cells[2,6]:='('+IntToStr(posm[2,1 ,2])+','+IntToStr(posn[2,1,2])+')'; StringGrid3.Cells[2,7]:='('+IntToStr(posm[2,2 ,2])+','+IntToStr(posn[2,2,2])+')'; StringGrid3.Cells[2,8]:='('+IntToStr(posm[2,3 ,2])+','+IntToStr(posn[2,3,2])+')'; StringGrid3.Cells[2,9]:='('+IntToStr(posm[2,4 ,2])+','+IntToStr(posn[2,4,2])+')'; StringGrid3.Cells[2,10]:='('+IntToStr(posm[2, 5,2])+','+IntToStr(posn[2,5,2])+')'; end; if form1.checkcellparent3.Checked=true then begin StringGrid3.Cells[3,1]:='('+inttostr(posm[3,1, 1])+','+inttostr(posn[3,1,1])+')'; StringGrid3.Cells[3,2]:='('+IntToStr(posm[3,2 ,1])+','+Inttostr(posn[3,2,1])+')'; StringGrid3.Cells[3,3]:='('+IntToStr(posm[3,3 ,1])+','+IntToStr(posn[3,3,1])+')'; StringGrid3.Cells[3,4]:='('+IntToStr(posm[3,4 ,1])+','+Inttostr(posn[3,4,1])+')'; StringGrid3.Cells[3,5]:='('+IntToStr(posm[3,5 ,1])+','+IntToStr(posn[3,5,1])+')'; StringGrid3.Cells[3,6]:='('+IntToStr(posm[3,1 ,2])+','+IntToStr(posn[3,1,2])+')'; StringGrid3.Cells[3,7]:='('+IntToStr(posm[3,2 ,2])+','+IntToStr(posn[3,2,2])+')'; StringGrid3.Cells[3,8]:='('+IntToStr(posm[3,3 ,2])+','+IntToStr(posn[3,3,2])+')'; StringGrid3.Cells[3,9]:='('+IntToStr(posm[3,4 ,2])+','+IntToStr(posn[3,4,2])+')'; StringGrid3.Cells[3,10]:='('+IntToStr(posm[3, 5,2])+','+IntToStr(posn[3,5,2])+')'; end; if form1.checkcellparent4.Checked=true then begin StringGrid3.Cells[4,1]:='('+inttostr(posm[4,1, 1])+','+inttostr(posn[4,1,1])+')'; StringGrid3.Cells[4,2]:='('+IntToStr(posm[4,2 ,1])+','+Inttostr(posn[4,2,1])+')'; StringGrid3.Cells[4,3]:='('+IntToStr(posm[4,3 ,1])+','+IntToStr(posn[4,3,1])+')'; StringGrid3.Cells[4,4]:='('+IntToStr(posm[4,4 ,1])+','+Inttostr(posn[4,4,1])+')'; StringGrid3.Cells[4,5]:='('+IntToStr(posm[4,5 ,1])+','+IntToStr(posn[4,5,1])+')'; StringGrid3.Cells[4,6]:='('+IntToStr(posm[4,1 ,2])+','+IntToStr(posn[4,1,2])+')'; StringGrid3.Cells[4,7]:='('+IntToStr(posm[4,2 ,2])+','+IntToStr(posn[4,2,2])+')'; StringGrid3.Cells[4,8]:='('+IntToStr(posm[4,3 ,2])+','+IntToStr(posn[4,3,2])+')';