Lasso Soft Inc. > Home

[ locale->formatAs ]


The [locale-formatAs] method us used to format the output of various values in the format of the locale.

This method has several sets of parameters that may accept for formatting. 

  • a single integer. This formats the thousands separators according to the locale
  • a decimal value and a locale keyword. This formats the value as the keyword type in the format of the locale. Valid keywords are: currency and scientific (invalid keywords have no effect)
  • a ucal value along with 3 integers.
  • Syntax
locale->formatAs(decimal, 'keyword')

locale->formatAs( integer )
  • Beginner

Express numeric values in a given country's format.

Use the [locale->formatAs] method.

The following example outputs a large integer and a currency value in the format expected in Germany.


local( myLocale = locale_germany)

#myLocale->formatAs(29.99, 'currency')+'\n'



29,99 €

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft