Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi NaN in Delphi 5 (https://www.delphipraxis.net/92960-nan-delphi-5-a.html)

philzu 29. Mai 2007 13:25


NaN in Delphi 5
 
Hallo, ich hab folgendes Problem.

Ich habe Quelltext für Delphi 2006 bekommen und möchte diesen in meine vorhandenen Projekte einbinden.
Ich habe nun das Problem dass ich nicht weis, wie ich unter Delphi 5 mit NaN (Not a Number) arbeite, ohne das ich mir meine eigene math Library erstellen muss. In Delphi 2006 ist diese Funktionalität schon in der Standard math intergiret. Ich habe auch schon versucht im jedi Projekt eine Lösung zufinden, habe leider nichts gefunden (vielleicht hat ja jemand tiefere Kenntnisse über Jedi).

Ich hoffe auf gute Lösungen
Phil

shmia 29. Mai 2007 13:31

Re: NaN in Delphi 5
 
In der JCL, Unit JclMath:
Delphi-Quellcode:
const
  Infinity   = 1/0;      // tricky
  {$EXTERNALSYM Infinity}
  NaN        = 0/0;      // tricky
  {$EXTERNALSYM NaN}
  NegInfinity = -Infinity;
  {$EXTERNALSYM NegInfinity}
Dort sind dann auch Funktionen, um NaN erkennen und weitere...

philzu 29. Mai 2007 14:10

Re: NaN in Delphi 5
 
Danke für den Tipp.
Genau das hab ich gesucht.
Kann jetzt alles Compilieren und es läuft. :)

Danke
Phil


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:12 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