Arsip: convert array dari vb ke delphi
more 12 years ago
diandewi
halo...saya lg convert coding dari vb ke delphi tp saya sdkit bingung dengan arraynya. saya sudah buat codingnya di delphi sepeerti ini, kira2 yang salah dmn ya?
mohon bantuannya
while (iter<= maxiter) do
begin
for i := 1 to 10 do
begin
for k := 1 to klaster do
begin
d (k):=0;
tempd ( k ):= 0;
for j := 0 to 10 do
begin
tempd ( k ) = tempd ( k ) + sqr( x (i, j) - w ( k, j)) ;
end;
d = Sqrt(tempd(k));
more 12 years ago
ianhade
coba gunakan ":=" (tanpa kutip) untuk mengisi nilai ke variabel array
dan gunakan tanda "" (tanpa kutip) untuk index array
more 12 years ago
diandewi
kayak gini ya maksudnya? tapi tetep error dy, errornya kayk gini:
[DCC Error] lvq.pas(133): E2066 Missing operator or semicolon
[DCC Error] lvq.pas(133): E2016 Array type required
while (iter<= maxiter) do
begin
for i := 1 to 10 do
begin
for k := 1 to klaster do
begin
d (k):=0;
tempd ( k ):= 0;
for j := 0 to 10 do
begin
tempd ( k ) := tempd ( k ) + sqr( x [i, j] - w [ k, j]) ;
end;
d := Sqrt(tempd(k));
end;
more 12 years ago
hendrang67
@diandewi: kayak gini ya maksudnya? tapi tetep error dy, errornya kayk gini: [DCC Error] lvq.pas(133): E2066 Missing operator or semicolon [DCC Error] lvq.pas(133): E2016 Array type requiredd dan tempd juga array kan ? kalau array indexnya juga pakai while (iter<= maxiter) do begin for i := 1 to 10 do begin for k := 1 to klaster do begin d [k]:=0; tempd [k]:= 0; for j := 0 to 10 do begin tempd[k]:= tempd[k] + sqr( x [i, j] - w [k, j]) ; end; d := Sqrt(tempd[k]); //<-- cek variabel d kalau array juga harus ada index nya end;while (iter<= maxiter) do begin for i := 1 to 10 do begin for k := 1 to klaster do begin d (k):=0; tempd ( k ):= 0; for j := 0 to 10 do begin tempd ( k ) := tempd ( k ) + sqr( x [i, j] - w [ k, j]) ; end; d := Sqrt(tempd(k)); end;
more 12 years ago
diandewi
ok...makasi...
oiya kalo saya mau ngambil nilai dari masing2 karakter array ini
ref : array of string = (('0','1','0','1','0','1','0','1','0','1'),('1','0','1','0','1','0','1','0','1','0'));
coding yang bener kyk gmn ya?
saya sblumnya buat kayak gini
for j := 1 to Length(ref(i));
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 4 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- Java Pada MsSql Migration Toolkit di Win 2003 Error
by Ardan in Hal umum tentang Pascal Indonesia more 17 years ago - Format input tanggal di Access
by jonathan_giuliano in Lain-lain more 15 years ago - tipikal programmer indonesia
by simba in OOT more 18 years ago - Right And Left
by umarbakri in Hal umum tentang Pascal Indonesia more 17 years ago - The Future of Delphi looks brighter than ever before!
by DelphiExpert in Hal umum tentang Pascal Indonesia more 15 years ago - Virus lokal baru nih
by alnas in Enginering more 17 years ago - buat file bengkak
by esafm in Tip n Trik Pemrograman more 16 years ago - Create Calculated Field saat Runtime??
by imunk in Tip n Trik Pemrograman more 17 years ago - Firebird....... kamu kenapa??
by bad2001 in FireBird more 16 years ago - gmn y cara memanggil prosedur timer
by vj_edogawa in Tip n Trik Pemrograman more 15 years ago