FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.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-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

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