FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version