Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Xbase Fox > Re: VFP 9: Maki...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 7 Topic 778 of 861
Post > Topic >>

Re: VFP 9: Making transform() Drop Decimal 0's

by tim_witort@[EMAIL PROTECTED] (Tim Witort) Jun 11, 2007 at 12:52 PM

Gene Wirchenko seemed to utter in news:124n63tul0d1lptj9u419dni7jmpt68obr@[EMAIL PROTECTED]
>>***** Start of Included Code *****
> "Giancarlo Piccinato" <piccinato@[EMAIL PROTECTED]
> wrote:
> 
>>And this is a more polished version:
> 
> [snip]
> 
>      I am quite capable of writing something to do it, but I was
> hoping that there was a point I was overlooking.  Is there a way to do
> this with one function call?

Well, the help file for TRANSFORM() says that it is supposed
to remove trailing zeros from the decimal part of numeric
values, but that can be easily demonstrated as not true.
If TRANSFORM() worked as advertised, you'd be home free.

Since it doesn't, you may need to write a little code that
removes trailing blanks from strings that contain a decimal
point.  Then you can just:

  ? DropTrailingZeros(TRANSFORM(5.30))

Look on the bright side, at least the solution is easy!

-- TRW
_______________________________________
t i m  .  w i t o r t
_______________________________________
 




 7 Posts in Topic:
VFP 9: Making transform() Drop Decimal 0's
Gene Wirchenko <genew@  2007-06-08 12:17:10 
Re: VFP 9: Making transform() Drop Decimal 0's
"Dan Freeman" &  2007-06-08 13:03:47 
Re: VFP 9: Making transform() Drop Decimal 0's
"Giancarlo Piccinato  2007-06-08 14:22:30 
Re: VFP 9: Making transform() Drop Decimal 0's
"Giancarlo Piccinato  2007-06-08 22:11:26 
Re: VFP 9: Making transform() Drop Decimal 0's
Gene Wirchenko <genew@  2007-06-09 22:46:46 
Re: VFP 9: Making transform() Drop Decimal 0's
tim_witort@[EMAIL PROTECT  2007-06-11 12:52:59 
Re: VFP 9: Making transform() Drop Decimal 0's
Gene Wirchenko <genew@  2007-06-09 22:41:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 14:05:30 CST 2008.