parseNumberWithFmtAndLcid

parseNumberWithFmtAndLcid(source:    String;
                          fmt:       NumberFormat;
                          lcid:      Integer;
                          errOffset: Integer output): Integer updating;

The parseNumberWithFmtAndLcid method of the Real primitive type parses the string specified in the source parameter using the specified format and locale, to ensure that it matches the format specified in the fmt parameter for sign sequence, sign position, thousands separator, decimal point sequence, and character set.

If the value of the fmt parameter is null, the settings for the locale specified in the lcid parameter are used. If the value of the lcid parameter is zero (0), the settings of the current locale are used.

If the value of the source parameter matches the format rules, the method returns zero (0) and sets the receiver to the parsed value. If it does not match the format rules, it returns a JADE error code (parse errors are in the range 1800 through 1869), indicates the first offending character returning its zero-based offset using the output errOffset parameter, and sets the receiver to the invalid value.

The sign sequence is optional but if it is included in the source, it must be correctly positioned. A space included in the sign sequence is optional.

Thousands separator sequences are optional but if they are included in the source, each one must have at least one digit preceding and following it, and must occur before the decimal point (if any).

If native digits are allowed, if the first digit found in the source is a native digit, all subsequent digits must also be native. Similarly, if the first digit found is ASCII, all subsequent digits must also be ASCII.

Only the first 15 significant digits of the value of the string are stored in the receiver. Any additional digits are rounded into the fifteenth digit and replaced with zeros.

The number of decimal places before and after the decimal point is preserved. Leading zeros before the decimal point and trailing zeros after the decimal point are ignored. For example, "12345678901234567890" is parsed and formatted results in 12345678901234600000 being stored in the receiver.

This method supports a maximum of 30 significant digits, whereas the fixed-point representation of a Real value can require up to 320 digits.

If native digits are allowed, if the first digit found in the source is a native digit, all subsequent digits must also be native. Similarly, if the first digit found is ASCII, all subsequent digits must also be ASCII.

If you do not define the EnhancedLocaleSupport parameter in the [JadeEnvironment] section of the JADE initialization file on the database node or you set it to false, inconsistent results could be returned to the application server when running in JADE thin client mode and there are locale overrides, as all overrides on the application server are suppressed if enhanced locale support is not enabled. Formatting of locale data is done on the application server, based on the locale of the corresponding presentation client.