FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How's change negative number to bracket in TCBrowse/XBrowse?
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
How's change negative number to bracket in TCBrowse/XBrowse?
Posted: Wed Mar 01, 2017 08:44 AM

Hi
As Title?
Ex.
-100,000 change to (100,000)
100,000 change to 100,000

Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 989
Joined: Thu Nov 24, 2005 03:01 PM
Re: How's change negative number to bracket in TCBrowse/XBrowse?
Posted: Wed Mar 01, 2017 09:47 AM
Hi,
I didn't tested but.. Have you used '@)' in the picture? I remember that the picture/transform ( function should do the trick.

Example from Clipper Guide:
Code (fw): Select all Collapse
@ 2, 1 SAY nNetLoss PICTURE "@)"
        // Result: (125.50)


Regardsj
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: How's change negative number to bracket in TCBrowse/XBrowse?
Posted: Thu Mar 02, 2017 02:30 AM
richard-service wrote:Hi
As Title?
Ex.
-100,000 change to (100,000)
100,000 change to 100,000


Saludos, -100.000 x (-1) = 100.000...saludos.. :-)
Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
Re: How's change negative number to bracket in TCBrowse/XBrowse?
Posted: Thu Mar 02, 2017 04:07 PM

Holas,,,

x := -1000.23

y := ABS(x)

? y

1000.23

Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: How's change negative number to bracket in TCBrowse/XBrowse?
Posted: Thu Mar 02, 2017 04:42 PM

Hi Helper,
Thanks a lot for this.
I mean negative number replace to bracket.
Ex. -100,000 => I want to show (100,000)
-10 => I want to show (10)
1,000 => same as 1,000

Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 117
Joined: Tue Jan 03, 2006 06:18 PM
Re: How's change negative number to bracket in TCBrowse/XBrowse?
Posted: Sat Mar 04, 2017 06:15 PM

Hi Richard,

Use :
picture '@( 9,999,999,999'

Regards,

Kok

Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: How's change negative number to bracket in TCBrowse/XBrowse?
Posted: Sat Mar 04, 2017 11:45 PM
kok joek hoa wrote:Hi Richard,

Use :
picture '@( 9,999,999,999'

Regards,

Kok

Hi Kok
I will try it. Thanks a lot
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit

Continue the discussion