>Is there a program avl for getting denomination of given amount..
>
>Something like this...
>
>100X3=??
>50X1=??
>etc etc
I don't understand the terminology used here; normally, denomination refers to the unit of currency. VFP doesn't inherently know the available currency denominations. it also doesn't save results of currency in the units used to build the total; you could roll your own mechanism for this; it would probably be best implemented as a class of some sort.
The problem here is how VFP would know that a single number represented a variety of denominations; for example, using US currency, I could make the amount $20 as:
1 $20 bill or
2 $10 bills or
1 $10 bill + 1 $5 bill + 5 $1 bills
and the available units of currency change from country to country.
If you're looking for the magnitude of the result of a computation, the easiest thing to do is take the interger portion of the base 10 log; this is a simple thing to do in VFP:
INT(LOG10(nExpression)) does exactly that.
? INT(LOG10(100*3))
? INT(LOG10(50*1))
? INT(LOG10(PI()*(3^2))