Autor Beitrag
martin.ich
Hält's aus hier
Beiträge: 2



BeitragVerfasst: So 02.05.04 13:32 
Hi,

ich erhalte immer die Fehlermeldung "Undeclared identifier:'RoundTo'"

Die Zeile des Quelltextes sieht so aus:

lineto(RoundTo(sqrt(sqr(k1)/2)*10+30, 0), RoundTo(sqrt(sqr(k1)/2)*10+30, 0));

Was muss ich tun? Und wie muss ich es tun?

Danke
martin.ich
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: So 02.05.04 13:42 
is "Math" in der uses?
Sourcecode hat folgendes geschrieben:
uses
{...} Classes, Graphics, Controls, Forms, Math, {...}


raziel

_________________
JSXGraph
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: So 02.05.04 14:01 
Hallo,

meines Wissens nach gibt es in Delphi keine Funktion namens RoundTo.
Die heißt Round.

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: So 02.05.04 14:44 
Such doch mal in der Delphi Hilfe (F1) nach "RoundTo":
Delphi Hilfe hat folgendes geschrieben:

Die Funktion rundet einen Gleitkommawert mit dem Rundungsverfahren "Banker’s Rounding" auf eine bestimmte Potenz von 10.
Unit: Math
Kategorie: Arithmetik
Delphi-Syntax:
ausblenden Delphi-Quelltext
1:
2:
type TRoundToRange = -37..37;
function RoundTo(const AValue: Double; const ADigit: TRoundToRange): Double;



raziel

_________________
JSXGraph
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mo 03.05.04 08:18 
Hallo,

in D5 gibt es diese Funktion mit Sicherheit nicht.

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)