Stop the rounding
Bruce Easton
bruce at stn.com
Fri Sep 14 11:43:41 PDT 2007
I wrote Friday, September 14, 2007 2:36 PM:
> To: filepro-list at lists.celestial.com
> Subject: RE: Stop the rounding
>
>
> scooter6 at gmail.com wrote Friday, September 14, 2007 2:10 PM:
> -----------------------------------
> -----------------------------------
> To: Steven Waters
> Cc: Filepro List
> Subject: Re: Stop the rounding
>
>
> Wouldn't just a simple mid statement do the trick?
>
> cb=mid(cb,1,3)
>
> Scott
>
> -----------------------------------
> -----------------------------------
>
> On 9/13/07, Steven Waters <swaters at triumphinstruments.com> wrote:
> ------------------------------
> 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
>
> Thanks in advance,
> Steve
> -----------------------------
> Yes, but only will work if your numbers are always
> the same length.
>
> Check out the floor and int functions -
> floor(expression) returns the next less int. w/
> same length, edit as expression whereas
> int(n) return the integer portion of a number.
>
> Bruce
>
> Bruce Easton
> STN, Inc.
Oops - I think I misunderstood what you were after.
To remove the "." from a number leaving the rest,
do something like:
Then: xx(10,*)=25; xy(10,*)=xlate(xx,".","")
Then xy will hold your desired result
(but still in non-numeric format).
Bruce
Bruce Easton
STN, Inc.
More information about the Filepro-list
mailing list