In our previous episode, Leonardo M. Ram? said: > Hi, I want to format a float number to currency. To do this, I use the Format > function using the %m format, as this:
> Format('%m', [123.25]); >I'm using Ubuntu 12.04 and my regional settings at configured to display "$ >1234.25", but I'm getting "123.25$", why is the money symbol at the right >side, instead of using the regional setting?. This is as per doc? http://www.freepascal.org/docs-html/rtl/sysutils/format.html FloatToStrF(Argument,ffGeneral,Precision,3) M Currency format. the next argument in the var{Args} array must be a floating point value. The argument is converted to a decimal string using currency notation. This means that fixed-point notation is used, but that the currency symbol is appended. If precision is specified, then then it overrides the CurrencyDecimals global variable used in the FloatToStrF In short, the M specifier formats it's argument as follows: FloatToStrF(Argument,ffCurrency,9999,Precision) Note the /append/ :-) _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal