Home » Community » Newbie corner » display approximation...
Re: display approximation... [message #35751 is a reply to message #35750] |
Fri, 16 March 2012 12:31  |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
Hello ,
you can try that:
use dl.Add(key, value);
dl.Clear();
for(int i=1; i<=value; ++i)
{
double k= value/i;
if ( k > 5 && k < 45 )
{
String s = Format("%.02f", k); // convert to string
//double StrDbl(const char *s);// back to double
dl.Add(k, s);
}
}
then to get the DropList value: use GetKey()
double d = fabs((double)dl.GetKey(i) - 17);
regards
omari.
|
|
|
Goto Forum:
Current Time: Mon May 12 15:32:50 CEST 2025
Total time taken to generate the page: 0.02981 seconds
|