FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

locale-format-number

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

Arguments:

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-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version