Autor Beitrag
toxicmaster
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: So 19.12.04 13:20 
hi,
ich habe einen rechner programmiert und will das bei dem ergebnis die maßeinheiten dazugeschrieben werden.
wie mache ich das?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button1Click(Sender: TObject);
begin
try
    edstr.Text:= floattostrf(strtofloat(edspa.text) / strtofloat(edwid.text) ,fffixed,6,4);
except
    showmessage('überprüfen Sie bitte ihre Angaben in den Textfeldern!');
end;
end;
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: So 19.12.04 13:52 
:gruebel: Darf ich fragen, was du genau meinst?

Viell.edstr.Text:= floattostrf(strtofloat(edspa.text) / strtofloat(edwid.text) ,fffixed,6,4) + ' Zentimeter';?

AXMD
toxicmaster Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: So 19.12.04 17:48 
also edstr ist editstromstärke(ampere)
edwid ist editwiderstand (ohm)
edspa ist editSpannung (volt)
aber ich glaube du hast mir da schon die lösung gegeben.
kann aber noch nicht ausprobieren.
hab erst morgen zeit also mal schauen wie das morgen aussieht.