Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interesting Challenge
Message
From
31/08/1999 11:18:15
 
 
To
31/08/1999 06:53:44
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00259328
Message ID:
00259685
Views:
12
A little better:
lparam n2Square, nDPs
local nResult

if !type('n2Square')='N' or n2Square < 0
	wait window 'The Number 2 Square is invalid'
	return -1
endif

if !type('nDPs')='N' or nDPs < 0
	nDPs = 2
endif

set decimal to iif(nDPs > 10, 10, int(nDPs))

nResult = 0
for nDP = 0 to -1*nDPs step -1
	do while (nResult + 10^ndp)^2 =< n2Square		
		nResult = nResult + 10^nDP
	enddo
endfor
return nResult
Previous
Reply
Map
View

Click here to load this message in the networking platform