Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Problem mit einer Funktion! (https://www.delphipraxis.net/61161-problem-mit-einer-funktion.html)

cruso 17. Jan 2006 17:55


Problem mit einer Funktion!
 
Hi!

Wie kann ich diese Funktion aufrufen:

Delphi-Quellcode:
function Pileibniz(Summandenzahl : integer):extended;
var
i, summand : integer;
begin
summand := 1;
result := 0;
for i:=1 to summandenzahl do
begin
result := result + (1/summand);
if  (1-summand) < 1 then summand := -1 * (summand+2)
else summand := -1 * (summand-2);
end;
result := result * 4;
end;
Ich hab irgendwie schon alles versucht aber der Compiler meldet trotzdem Fehler (kann auch an mir liegen :lol: )! Wie kann ich das standardmäßig machen?

Matze 17. Jan 2006 17:57

Re: Dumme Frage zu einer Funktion!
 
Hallo, ändere bitte deinen Titel, damit man weiß, um was es geht.

Delphi-Quellcode:
//Aufruf
Extended_Zahl := Pileibniz (Integer_Zahl);

Nachtrag: Es heißt "standard"


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:59 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz