Autor Beitrag
kasi159
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 28



BeitragVerfasst: Do 16.12.04 17:54 
also ich bzw der Jay hat nen umrechern geproggt mit floattostr halt und jetzt bekommen wir beide folgende Fehlermeldung:


"Im Project 1.exe ist eine Exception der Klasse EConvert aufgetreten. Meldung: "1,5' ist kein gültiger Gleitkommawert' . Der Prozess wurde angehalten. Mit einzelnen Anweisungen oder Start forfahren." so das ist die Meldung alledings macht es keinen Unterschied ob ich einen Wert mit KOmma oder Punkt eingebe. mfg kasi159


ach so hier noch der code

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
var
  Form1: TForm1;
implementation

{$R *.dfm}

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if key=Char(ord(',')) then key:=Char(ord('.'));
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  euro,dollar,kurs:real;
begin
kurs:=StrToFloat(Edit2.Text);
if Radiobutton1.Checked then
begin
  euro:=StrToFloat(Edit1.Text);
  dollar:=euro/kurs;
  Edit3.Text:=FloatToStr(dollar);
end else
begin
  dollar:=StrToFloat(Edit1.Text);
  euro:=dollar*kurs;
  Edit3.Text:=FloatToStr(euro);
end;
end;

procedure TForm1.RadioButton1Click(Sender: TObject);
begin
If Radiobutton1.Checked then Label3.Caption:='$';
If Radiobutton2.Checked then Label3.Caption:='€';
end;

procedure TForm1.RadioButton2Click(Sender: TObject);
begin
If Radiobutton1.Checked then Label3.Caption:='$';
If Radiobutton2.Checked then Label3.Caption:='€';
end;

end.



Hilfe! :?: :!:
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Do 16.12.04 18:01 
argh :autsch: konnte ichs wissen? man benötigt das KOMMA nicht den punkt... nimm

ausblenden Delphi-Quelltext
1:
if key=Char(ord('.')) then key:=Char(ord(','));					


danke xD

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
kasi159 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 28



BeitragVerfasst: Do 16.12.04 18:05 
okay :D :D :D :D :D :D :D :D :D 8)
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Do 16.12.04 18:10 
abgesehen davon das die zeile total unnötig programmiert ist :lol:
so gehts nämlich auch:
ausblenden Delphi-Quelltext
1:
2:
if key='.' then
  key:=',';

chr ist nämlich das gegenstück zu ord :shock:

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Do 16.12.04 19:47 
ich hatte da was verwechselt... ich wollte den bytecode des punktes ermitteln und dann hab ich irgentwie (warum auch immer, ich blick mich nich) den bytecode wieder in nen buchstaben verwandelt :shock: nja egal... hauTsache es klappt jetzt ^^ ... ich bin ein idiot. :oops:

kasi ist fies; ich habs sofort rausgefunden, nachdem er den thread erstellt hat. hab ihn gebeten, ihn zu löschen, aber er ist fies ^^

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.