Hi,
Can anybody explain USIND command ? In the help file is almost nothing.
I need format number in range 0 to 9999 to 0,00 - 99,99.
Paja
In the Help, see: General Programming, then Formatting Output. That is where the description is.
Hope that helps,
Bill
This works OK
def test:string
def test_1:INT
def win_error:window
openwindow win_error,300,150,260,250,@BORDER,0,"DEVICE ERRORS",&hndr
test_1 = 221
test = USING("0####", test_1)
print win_error, test
---------------------------------------------------------------------------
but this will return 0.00 - all digits zero
def test:string
def test_1:INT
def win_error:window
openwindow win_error,300,150,260,250,@BORDER,0,"DEVICE ERRORS",&hndr
test_1 = 221
test = USING("0##.##", test_1)
print win_error, test
Quote from: paja on January 19, 2011, 04:42:35 PM
I need format number in range 0 to 9999 to 0,00 - 99,99.
I believe this does exactly what you asked for:
int x,l,r
x=9999
int l= x/100
int r=x%100
if l < 10
print USING("0#",l)+","+USING("0##",r)
else
print USING("0##",l)+","+USING("0##",r)
endifLarryMc
Larry,
Very nice !
Thanks