Hiba_t
30th November 2010, 14:49
Hi all,

I'm running the following code lines in my script, as I copied them from the manual pages.

string result(80)
result = sprintf$("%A001", 1234.56)

But the result I get is result = "%".

Am I doing something wrong??

Thanks in advance,
Hiba

bdittmar
30th November 2010, 18:55
Hi all,

I'm running the following code lines in my script, as I copied them from the manual pages.

string result(80)
result = sprintf$("%A001", 1234.56)

But the result I get is result = "%".

Am I doing something wrong??

Thanks in advance,
Hiba

Hello,

Amounts

| Suppose the default currency is USD ($)

| and A001 is defined as "$$ 999T999T999VD99"

string result(80)

result = sprintf$("%A001", 1234.56)

| result contains "$ 000,001,234.56"

result = sprintf$("%-10A001,hfl", 1234.56)

| result contains "fl 000.001.234,56"

result = sprintf$("%-.10A001,hfl", 1234.56)

| result contains "001.234,56"; there is insufficient space

| for currency symbol

Is the format 001 for the currency defined in ttaad1107m000 ?

result = sprintf$("%A001,<a defined currency>", 1234.56)

Regards

Hiba_t
1st December 2010, 08:08
Thanks for your quick reply...

And yes, format 001 is defined in "session formats by generic units".

Regards,
Hiba