Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 15, 2018 10:11 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Format
PostPosted: Sun Mar 24, 2013 9:55 am 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
Hi

How i can made a new Format class to more function like - and + value


:idea:

_________________
Thanks for any contribution and God blesses all (I start Using RS in 10/12/2010)
Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 Personal and Linux RS2012r1 Personal Register user
my Hobbies R/C Turbines Jets Models


Top
 Profile  
Reply with quote  
 Post subject: Re: Format
PostPosted: Mon Mar 25, 2013 10:28 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
jetpr wrote:
Hi

How i can made a new Format class to more function like - and + value


:idea:

no puedo entender que dijiste arriba...

enviame un mensaje a que quieres hacer.

(Send me a private message of what you're trying to do)

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
Reply with quote  
 Post subject: Re: Format
PostPosted: Tue Mar 26, 2013 7:26 am 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
ok
Dim num as Double
num=-10.00
Format(num,"##,##0.00")

If the Format Function detect is the value is example: -10.00 then Format show -10.00 and no 10.00

_________________
Thanks for any contribution and God blesses all (I start Using RS in 10/12/2010)
Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 Personal and Linux RS2012r1 Personal Register user
my Hobbies R/C Turbines Jets Models


Top
 Profile  
Reply with quote  
 Post subject: Re: Format
PostPosted: Tue Mar 26, 2013 9:52 am 
Offline
User avatar

Joined: Wed Feb 01, 2012 3:06 pm
Posts: 68
Try this...

Format( num,"-##,##0.00" )

Ron Bower

_________________
Ron Bower
Ellicott City, MD


Top
 Profile  
Reply with quote  
 Post subject: Re: Format
PostPosted: Tue Mar 26, 2013 10:56 am 
Offline

Joined: Wed May 20, 2009 4:43 pm
Posts: 958
Another solution, if you need more control over the formatting, is that you can use 3 different format strings separated by semicolons. The first will apply to positive numbers, the second to negative numbers, and the third to zero (0).

Format(num,"+##,##0.00;(##,##0.00);\N\/\A")

_________________
RB 2009r4 Windows XP


Top
 Profile  
Reply with quote  
 Post subject: Re: Format
PostPosted: Tue Mar 26, 2013 11:18 am 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
ok

Thanks

_________________
Thanks for any contribution and God blesses all (I start Using RS in 10/12/2010)
Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 Personal and Linux RS2012r1 Personal Register user
my Hobbies R/C Turbines Jets Models


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group