Jump to content

Sys2FormatNumber: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==Description==
Formats a number to use thousands-grouping characters. The system values for the current locale are used for the thousands-grouping character and the decimal place, if any. Note that the IBM C runtime's built-in locale definitions are used; these may not correspond precisely to the system locales as defined in the OS/2 Locale object.
Formats a number to use thousands-grouping characters. The system values for the current locale are used for the thousands-grouping character and the decimal place, if any. Note that the IBM C runtime's built-in locale definitions are used; these may not correspond precisely to the system locales as defined in the OS/2 Locale object.


The input number may be a positive or negative integer or floating point value.  It must be a simple, non-localized number value; in other words, it must not contain any thousands-grouping characters, and any decimal point which it contains must be a period (rather than any localized decimal symbol).
The input number may be a positive or negative integer or floating point value.  It must be a simple, non-localized number value; in other words, it must not contain any thousands-grouping characters, and any decimal point which it contains must be a period (rather than any localized decimal symbol).
             
 
==Arguments==                                                           
==Arguments==                                                           
REXX ARGUMENTS:                                                        
REXX ARGUMENTS:                                                        
   1. Number to be formatted.                                  (REQUIRED)  
   1. Number to be formatted.                                  (REQUIRED)
   2. Number of decimal places to use for floating point values.   
   2. Number of decimal places to use for floating point values.   
     Ignored for integer values.                            (DEFAULT: 2)
     Ignored for integer values.                            (DEFAULT: 2)
Line 12: Line 11:
REXX RETURN VALUE: The formatted number, or '' on error.
REXX RETURN VALUE: The formatted number, or '' on error.


[[Category:The OS/2 API Project]]
[[Category:RxUtilEx]]

Revision as of 14:16, 26 February 2017

Formats a number to use thousands-grouping characters. The system values for the current locale are used for the thousands-grouping character and the decimal place, if any. Note that the IBM C runtime's built-in locale definitions are used; these may not correspond precisely to the system locales as defined in the OS/2 Locale object.

The input number may be a positive or negative integer or floating point value. It must be a simple, non-localized number value; in other words, it must not contain any thousands-grouping characters, and any decimal point which it contains must be a period (rather than any localized decimal symbol).

Arguments

REXX ARGUMENTS:

 1. Number to be formatted.                                  (REQUIRED)
 2. Number of decimal places to use for floating point values.  
    Ignored for integer values.                            (DEFAULT: 2)
                                                                        

REXX RETURN VALUE: The formatted number, or on error.