![]() |
hebräische verschlüsselung
hey leute ich schreibe grad ein programm, was einen text verschlüsseln soll, mittels hebräischer verschlüsselung, aber irgendwie funktioniert es nicht, es kommen aber auch keine fehlermeldungen.
Bitte um hilfe. hier der quelltext:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var laenge, laenge1, laenge2 : Real; arrayzahl, x1, y1, x2, y2, s, i : Integer; tabelle : array of string; text2, text : string ; begin laenge:=length(text); laenge1:=sqrt(laenge); laenge2:=round(laenge1); arrayzahl:=trunc(laenge2); x1:=0; y1:=0; s:=1; for i:=1 to arrayzahl do begin tabelle[x1,y1]:=text[s]; x1:=x1+1; s:=s+1; if x1=arrayzahl then begin x1:=0; y1:=y1+1; end; end; x2:=0; y2:=0; for i:=1 to arrayzahl do begin text2:=text2+tabelle[x2,y2]; y2:=y2+1; if y2=arrayzahl then begin y2:=0; x2:=x2+1; end; end; edit2.Text:=text2; end; |
AW: hebräische verschlüsselung
Zitat:
|
AW: hebräische verschlüsselung
Wie soll das knallen, es wird ja niemals aufgerufen :mrgreen:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var laenge, laenge1, laenge2 : Real; arrayzahl, x1, y1, x2, y2, s, i : Integer; tabelle : array of string; text2, text : string ; begin laenge:=length(text); // text nicht definiert, also 0 laenge1:=sqrt(laenge); // =0 laenge2:=round(laenge1); // =0 arrayzahl:=trunc(laenge2); // =0 x1:=0; y1:=0; s:=1; for i:=1 to arrayzahl do begin // arrayzahl=0 also kein durchlauf tabelle[x1,y1]:=text[s]; x1:=x1+1; s:=s+1; if x1=arrayzahl then begin x1:=0; y1:=y1+1; end; end; x2:=0; y2:=0; for i:=1 to arrayzahl do begin // arrayzahl=0 also kein durchlauf text2:=text2+tabelle[x2,y2]; y2:=y2+1; if y2=arrayzahl then begin y2:=0; x2:=x2+1; end; end; edit2.Text:=text2; // text2 ist leer, also end; |
AW: hebräische verschlüsselung
Stümmt, das hätte man beim Debuggen aber sicherlich herausgefunden :zwinker:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:55 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz