HPlogo MPE/iX Intrinsics Reference Manual > Chapter 9 Command Definitions (MAIL-PUTJCW)

NLNUMSPEC

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701
Edition 7 E0300 ♥
Edition 6 E0195

NM and CM callable.

Returns the information needed for formatting and converting numbers. It combines several calls to NLINFO to simplify the use of native language formatting. By calling NLNUMSPEC once, and passing the obtained information to NLFMTNUM and NLCONVNUM, implicit calls to NLNUMSPEC from NLFMTNUM and NLCONVNUM are avoided and performance is improved.

Syntax



             I16V     U16A    U16A
  NLNUMSPEC (langnum, string, error);

Parameters


langnum

16-bit signed integer by value (required)

Contains the language ID number.

string

16-bit unsigned integer array (required)

Contains >= 60 bytes, where the following information is returned:

Bytes

Meaning

00-01

Language identification number (integer)

02-03

Alternate digit indicator (integer)

0

No alternate digits exist

1

Alternate digits exist

06-07

Alternate digit range (0,9)

08

Decimal separator (ASCII-digits)

09

Decimal separator (alternate-digits)

10

Thousands separator (ASCII-digits)

11

Thousands separator (alternate-digits)

12

'+' (alternate-digits)

13

'-' (alternate-digits)

14

Right-to-left space

15

Reserved for the operating system

16-17

Currency place (integer)

0

Currency symbol

1

Currency symbol succeeds the number

2

Currency symbol replaces the decimal separator

3

Currency symbol precedes the sign

18-19

Length of currency symbol (integer), includes spaces

20-37

Currency symbol, includes spaces

38-59

Reserved for the operating system

error

16-bit unsigned integer array (required)

Returns two elements: the first element is the error number; the second element is reserved and always returns 0. The possible error number values are:

Value

Meaning

0

Successful

1

*NLS not installed

2

*Specified language not configured

3

Invalid string

5

*NLS internal error

6

*NLS internal error

* Do not apply to calls with langnum equal to 0 (NATIVE3000/XL).

Operation Notes


Split-stack calls are not permitted.

The intrinsic combines NLINFO calls with itemnums 9, 10, 31, 32, and 33. The information is formatted where needed (for example, any spaces in the currency symbol/name are included). The currency symbol/name is the shortest nonblank descriptor, as returned from NLINFO itemnums 10 and 31.

This intrinsic does not provide any information not obtainable with NLINFO. It is included for the convenience of the NLS user. For efficiency, the user of this intrinsic calls it only once, saves the result, and calls NLFMTNUM and/or NLCONVNUM multiple times.

Related Information


Intrinsics

NLCONVNUM, NLFMTNUM

Manual

Native Language Programmer's Guide




NLMATCHINIT


NLREPCHAR