Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Martin Krivka
  Where is Martin Krivka?
 
 Czech Republic
 Martin Krivka
 To: Rajesh Samadia
  Where is Rajesh Samadia?
 Jaipur
 India
 Rajesh Samadia
 Tags
Subject: RE: Convert Number to Character
Thread ID: 345574 Message ID: 345593 # Views: 80 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Thursday, May 24, 2012 6:00:31 PM         
   


> > m.number=15.390
> >
> > ? str( round(m.number,3), 12, 3)
> >
> >
> >
> > hth
> > Martin
>
> Thanks for your reply
>
> But My Question is I do not know the no of decimal places used in expression. how do find the no of decimals used in the numeric expression
>
> regards


Not sure if understood what you need. Count of decimals ? Something like:

m.number=15.3932323

m.dec=0
do while .t.
	if int(m.number)=m.number
		exit
	endif
	m.dec=m.dec+1
	m.number=m.number*10
enddo

? "count of decimals:",m.dec


Martin

ENTIRE THREAD

Convert Number to Character Posted by Rajesh Samadia @ 5/24/2012 3:48:30 PM
RE: Convert Number to Character Posted by Martin Krivka @ 5/24/2012 4:04:17 PM
RE: Convert Number to Character Posted by Rajesh Samadia @ 5/24/2012 4:26:39 PM
RE: Convert Number to Character Posted by Martin Krivka @ 5/24/2012 6:00:31 PM
RE: Convert Number to Character Posted by Ilya Rabyy @ 5/24/2012 4:10:54 PM
RE: Convert Number to Character Posted by Rajesh Samadia @ 5/24/2012 4:29:43 PM
RE: Convert Number to Character Posted by Anders Altberg @ 5/24/2012 5:36:28 PM
RE: Convert Number to Character Posted by Ilya Rabyy @ 5/24/2012 7:03:27 PM
RE: Convert Number to Character Posted by Anders Altberg @ 5/26/2012 6:13:34 PM
RE: Convert Number to Character Posted by David Mustakim @ 5/26/2012 6:43:25 PM
RE: Convert Number to Character Posted by Anders Altberg @ 5/26/2012 7:02:46 PM
RE: Convert Number to Character Posted by David Mustakim @ 5/26/2012 8:08:50 PM
RE: Convert Number to Character Posted by Tony Vignone @ 5/26/2012 8:21:21 PM
RE: Convert Number to Character Posted by David Mustakim @ 5/26/2012 8:39:01 PM
RE: Convert Number to Character Posted by tushar @ 5/24/2012 4:45:04 PM
RE: Convert Number to Character Posted by Rajesh Samadia @ 5/26/2012 9:21:13 AM
RE: Convert Number to Character Posted by tushar @ 5/26/2012 1:02:15 PM
RE: Convert Number to Character Posted by Tony Vignone @ 5/24/2012 7:25:58 PM
RE: Convert Number to Character Posted by Rajesh Samadia @ 5/26/2012 9:25:37 AM
RE: Convert Number to Character Posted by Anders Altberg @ 5/26/2012 12:59:30 PM
RE: Convert Number to Character Posted by Tony Vignone @ 5/26/2012 2:57:00 PM
RE: Convert Number to Character Posted by Tony Vignone @ 5/26/2012 5:54:21 PM
RE: Convert Number to Character Posted by David Mustakim @ 5/26/2012 3:14:14 PM
RE: Convert Number to Character Posted by Tony Vignone @ 5/26/2012 8:19:16 PM
RE: Convert Number to Character Posted by David Mustakim @ 5/26/2012 8:49:11 PM
RE: Convert Number to Character Posted by Luis Maria Guayan @ 5/28/2012 1:33:17 AM
RE: Convert Number to Character Posted by Tony Vignone @ 5/28/2012 4:42:39 PM
RE: Convert Number to Character Posted by Norberto Gomez Moure @ 5/29/2012 1:07:39 AM
RE: Convert Number to Character Posted by David Mustakim @ 5/29/2012 7:20:47 AM
RE: Convert Number to Character Posted by Tony Vignone @ 5/29/2012 3:06:41 PM
RE: Convert Number to Character Posted by Norberto Gomez Moure @ 5/29/2012 5:05:08 PM