Stop the rounding

fp at casabellagallery.com fp at casabellagallery.com
Fri Sep 14 17:11:27 PDT 2007


Steven posted:

> 
> Good Day,
> I have a Filepro question.
> 
> I am trying to strip the decimal out of a number.
> I have this written;
> 
> cb(10,.0)=25
> 
> 25 is (10,.2)
> 
> if the number for field 25 is 880.88
> I get 881 out for dummy cb
> or if the number is 710.00 I get 710 instead of 71000
> 
> How do you strip out a numbers decimal and stop the rounding and dropping of
> the 00
> 

Steven,

If you have 880.88 and you wanted 88000 you simply must 

cb(10,.0)  = int(25) *  "100"

In the same token, if you had 710.00 and wanted 71000

cb(10,.0) = int(25) * "100"

given that field 25 holds any of these values at any given
time.

Not need to use xlate(), no need to use mid(), no need to break the field
into multiple fields and put it back together.

That said, if you DO want to round up and elevate it, you can then try

cb(10,.0) = doedit(25,"10,.0","10") * "100"


Hope this helps!


Jose Lerebours
954-559-7186
http://www.fpgroups.com





More information about the Filepro-list mailing list