2.1.16.4.3 is_double_legal


Description

Tests if a given double value is a legal double from the standpoint of processor.

Syntax

BOOL is_double_legal( double * pr )

Parameters

pr
[input] pointer to a double value whose legality should be tested.

Return

TRUE if legal, otherwise FALSE.

Examples

EX1

void is_double_legal_ex1()
{
	double * pr, dTest = (1.7e+307)*10000 ;

	pr = &dTest;
	bool bRet = is_double_legal(pr);
	if(true == bRet)
		out_str("The double is legal");
	else
		out_str("The double is illegal");
	
	dTest = 3.569;
	bRet = is_double_legal(pr);
	if(true == bRet)
		out_str("The double is legal");
	else
		out_str("The double is illegal");
}

Remark

See Also

Header to Include

origin.h

Reference