Autor Beitrag
CxxxB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Sa 01.12.12 20:41 
Guten Abend,
und zwar wollte ich kurz und knapp wissen, wie ich mit dem Exponenten rechnen kann.

Ich habe es so geregelt, das man in einer neuen Form in einer Edit-Box mit Zahlen dann den Exponenten selber wählen kann.
Leider weiß ich nicht, wie ich nun damit rechnen kann.

Ich hoffe ihr könnt mir helfen.
mandras
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 432
Erhaltene Danke: 107

Win 10
Delphi 6 Prof, Delphi 10.4 Prof
BeitragVerfasst: Sa 01.12.12 22:05 
user profile iconCxxxB hat folgendes geschrieben Zum zitierten Posting springen:
Ich hoffe ihr könnt mir helfen.


Mit Sicherheit. Es würde uns aber leichter fallen wenn Du Dein Problem genauer schildern würdest.
GuaAck
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 378
Erhaltene Danke: 32

Windows 8.1
Delphi 10.4 Comm. Edition
BeitragVerfasst: Sa 01.12.12 22:11 
Hi,

In TEdit.Text ist die Eingabe als Text gespeichert. Diesen würde ich zunacht mit Edit1.Text+'E'+Edit2.Text in einen neuen String packen und den dann mit strtofloat wandeln. Es wird eine Exception ausgelöst, wenn der Text nicht wandelbar ist. Alternativ Strtofloatdef.

Gruß GuaAck
mandras
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 432
Erhaltene Danke: 107

Win 10
Delphi 6 Prof, Delphi 10.4 Prof
BeitragVerfasst: Sa 01.12.12 22:39 
Die Verwirrung steigert sich..

"Ich brauche eine Schraube für meine Honda". "Was für eine?" "sie ist rot".
CxxxB Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Sa 01.12.12 22:50 
Ich brauch einfach ein Befehl, womit ich eine Zahl als Exponent für die andere Zahl verwenden kann und er dies dann ausrechnet.



Als Beispiel:

sqr(Zahl1)

oder

Zahl1^zahl2 = ...
rushifell
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 306
Erhaltene Danke: 14



BeitragVerfasst: Sa 01.12.12 22:59 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
Uses math;
...
Var i:Extended;
begin
i:= Power(4,3);
ShowMessage(FloatToStr(i)); //64
end;


Viele Grüße
CxxxB Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Sa 01.12.12 23:05 
Vielen Dank.