Function | Package: excl | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## locale-format-number

Arguments: stream value suppress-ts suppress-dp &optional (locale *locale*)

Arguments:

- stream is a stream.
- value is a number.
- suppress-ts is a boolean.
- suppress-dp is a boolean.
- locale is a locale.

This function outputs value to stream in the locale appropriate numeric format.

If suppress-ts is specified true, then the thousands-separator character is not used.

If suppress-dp is specified true, then the decimal-point character is not used if value is an integer.

The function locale-format-number can be invoked using the format ~/ directive. The locale argument can be supplied using format's ~v construct. The suppress-ts argument is specified using the colon modifier. The suppress-dp argument is specified using the at-sign modifier.

### Examples:

    ;; [assuming *locale* is (find-locale "en_US")]

    (locale-format-number *terminal-io* 12345 nil nil)
      prints 12,345

    (format t "~/locale-format-number/" 12345.67)
      prints 12,345.67

    (format t "~v/locale-format-number/" :fr_FR 12345.67)
      prints 12 345,67

    (format t "~v/locale-format-number/" :fr_FR 12345)
      prints 12 345,

    (format t "~v:/locale-format-number/" :fr_FR 12345)
      prints 12345,

    (format t "~v@/locale-format-number/" :fr_FR 12345)
      prints 12 345

See Localization support in Allegro CL in iacl.htm. See also iacl.htm for general information on locales in Allegro CL.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version