Home  |  Delphi .net Home  |  System.Single  |  IsNaN Method
  
IsNaN  
Method  
Returns true if a a given Single has no valid value
Single Structure
System NameSpace
CF1.  Function IsNaN ( Value : Double ) : Boolean; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
If Value is NaN (Not a Number) then the result is true otherwise false.
 
NaN results from 0/0.
Notes
Static methods are not methods of an object - they are simply class functions or procedures available at any time.
Microsoft MSDN Links
System
System.Single
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  value : Single;

begin
  value := 0/0;

  if System.Single.IsNaN(value)
  then Console.WriteLine('0/0 is not a number')
  else Console.WriteLine('0/0 is a number');

  Console.ReadLine;
end.
   0/0 is not a number
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author