View previous topic :: View next topic |
Author |
Message |
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Tue May 23, 2006 9:33 pm Post subject: variable width format specifiers |
|
|
Same question I asked in the ng: how is this C code translated to D using Mango?
Code: |
int l = 8, d = 4;
double v = 34.289;
sprintf (buf, "?*.*g", l, d, v);
|
|
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 23, 2006 9:54 pm Post subject: |
|
|
indirect width is not currently supported by Mango float-format |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Wed May 24, 2006 6:07 am Post subject: |
|
|
kris wrote: | indirect width is not currently supported by Mango float-format |
Too bad. Will it be supported? |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Wed May 24, 2006 10:05 am Post subject: |
|
|
Carlos wrote: | kris wrote: | indirect width is not currently supported by Mango float-format |
Too bad. Will it be supported? |
While indirect-precision is not supported via printf-formatting, it can be provided to Double.format() instead |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Wed May 24, 2006 11:23 am Post subject: |
|
|
kris wrote: | Carlos wrote: | kris wrote: | indirect width is not currently supported by Mango float-format |
Too bad. Will it be supported? |
While indirect-precision is not supported via printf-formatting, it can be provided to Double.format() instead |
Works great! Thanks! |
|
Back to top |
|
|
|