HP 3000 Manuals

NLINFO [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation


MPE/iX Intrinsics Reference Manual

NLINFO 

NM and CM callable.

Returns language-dependent information.  The type of information that can
be obtained includes:

   *   Calendar format
   *   Date and time format
   *   Currency
   *   Collating
   *   Translation
   *   Character set

Syntax 
__________________________________________
|                                        |
|               I16V    *      I16   U16A|
|     NLINFO(itemnum,item,langnum,error);|
__________________________________________

            

Parameters 

itemnum               16-bit signed integer by value (required) 

                      Contains the item to be returned.

item                  type of variable depends on itemnum (required) 

                      Returns information requested or the language name
                      or number requested.  Table 4-26  lists the
                      defined itemnums, data types (mnemonics), and a
                      description of the information returned to item.

langnum               16-bit signed integer by reference (required) 

                      Contains the language ID number, for the
                      information requested, except for NLINFO itemnums
                      22 and 24.  For NLINFO itemnum= 22, the language ID
                      number is returned in langnum; for NLINFO itemnum=
                      24, the character set ID number is returned in
                      langnum.

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      *Specified character set not configured

                           4      No national table present

                           5      *NLS internal error

                           6      *NLS internal error

                          7-9     Reserved for the operating system

                          10      Itemnum out of range

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

          Table 4-26.  NLINFO Itemnum/Item Values 

-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
| Itemnum  | Mnemonic |                           Item Description                            |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    1     |    CA    | Returns the calendar format in an 18 byte array.  The 18 bytes of the |
|          |          | string for this definition are interpreted as the format description  |
|          |          | for that language.  The following descriptors are valid:              |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | D       1 byte day abbreviation                                       |
|          |          |                                                                       |
|          |          | DD      2 byte day abbreviation                                       |
|          |          |                                                                       |
|          |          | DDD     3 byte day abbreviation                                       |
|          |          |                                                                       |
|          |          | M       1 byte month abbreviation                                     |
|          |          |                                                                       |
|          |          | MM      2 byte month abbreviation                                     |
|          |          |                                                                       |
|          |          | MMM     3 byte month abbreviation                                     |
|          |          |                                                                       |
|          |          | MMMM    4 byte month abbreviation                                     |
|          |          |                                                                       |
|          |          | mm      Numeric month of the year                                     |
|          |          |                                                                       |
|          |          | dd      Numeric day of the month                                      |
|          |          |                                                                       |
|          |          | yy      Numeric year of the century                                   |
|          |          |                                                                       |
|          |          | yyyy    Numeric year                                                  |
|          |          |                                                                       |
|          |          | Nyy     National year                                                 |
|          |          |                                                                       |
|          |          | NPyy    National year that can include a before-period symbol         |
|          |          |                                                                       |
|          |          | E       1-8 of these are replaced by an equal amount of bytes from    |
|          |          |         the emperor/country name                                      |
|          |          |                                                                       |
|          |          | Valid separators are any special character.  For example, a format    |
|          |          | can be DDD, MMM DD, yyyy.  Using this format in NATIVE3000/XL results |
|          |          | in FRI, MAY 25, 1984.                                                 |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------

          Table 4-26.  NLINFO Itemnum/Item Values (cont.) 

-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
| Itemnum  | Mnemonic |                           Item Description                            |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    2     |    CA    | Returns the custom date format in a 13 byte array.  The 13 bytes of   |
|          |          | the string for this definition are interpreted as the custom date     |
|          |          | format description.  The following descriptors are valid:             |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | mm      Numeric month of the year                                     |
|          |          |                                                                       |
|          |          | dd      Numeric day of the month                                      |
|          |          |                                                                       |
|          |          | yy      Numeric year of the century                                   |
|          |          |                                                                       |
|          |          | yyyy    Numeric year                                                  |
|          |          |                                                                       |
|          |          | Nyy     National year                                                 |
|          |          |                                                                       |
|          |          | NPyy    National year that can include a before-period symbol         |
|          |          |                                                                       |
|          |          | Valid separators are any special character.  For example, a date      |
|          |          | format can be yy/mm/dd.  This format in NATIVE3000/XL results in      |
|          |          | 81/03/25.                                                             |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    3     |    CA    | Returns the clock specification in an 8 byte array.  This 8 byte      |
|          |          | string provides the clock format description (template) HHSXXYYZ,     |
|          |          | where the elements specify the following:                             |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | HH      Clock hour specification, either `' or `$'                    |
|          |          |                                                                       |
|          |          | S       Separator; valid separators can be any special or alphabetic  |
|          |          |         character, or 0 for no separator between hours and minutes    |
|          |          |                                                                       |
|          |          | XX      Symbol for AM                                                 |
|          |          |                                                                       |
|          |          | YY      Symbol for PM                                                 |
|          |          |                                                                       |
|          |          | Z       Suppresses leading zero (of hours) if blank; prints leading   |
|          |          |         zero if 0                                                     |
|          |          |                                                                       |
|          |          | In suppression of leading zero, " " (leading zero suppressed) or 0    |
|          |          | (leading zero is printed) are valid.  For example, the format         |
|          |          | "12:AMPM " results in the formatted clock information 9:06 AM; the    |
|          |          | leading zero is suppressed.  If the clock specification were changed  |
|          |          | to "240    0", the formatted clock information for the same time is:  |
|          |          | 0906.  Note the four blanks used as place holders to ensure the       |
|          |          | correct placement of the leading-zero suppression character.          |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    4     |    CA    | Returns the month abbreviation table in a 48 byte array.  Each        |
|          |          | abbreviation is 4 bytes long, using blank padding where necessary to  |
|          |          | maintain uniform length in all native language abbreviations.  For    |
|          |          | example, the NATIVE3000/XL abbreviations contain 3 bytes plus a       |
|          |          | blank.  The first 4 bytes of the array contain the abbreviation of    |
|          |          | January.  For example, the month abbreviation table is:               |
|          |          | "JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC "                    |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    5     |    CA    | Returns the month table in a 144 byte array.  Each month's name can   |
|          |          | be up to 12 bytes long.  Unused space in the month name is padded     |
|          |          | with blanks where necessary to equal 12 bytes.  The table begins with |
|          |          | the language-dependent equivalent in the native language specified    |
|          |          | for January.  For example, the month name table is:                   |
|          |          | "JANUARY  FEBRUARY  MARCH...DECEMBER"                                 |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    6     |    CA    | Returns the day abbreviation table in a 21 byte array.  Each          |
|          |          | abbreviation is 3 bytes long.  The table begins with Sunday.  For     |
|          |          | example, the day abbreviation table is:                               |
|          |          | "SUNMONTUEWEDTHUFRISAT"                                               |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------

          Table 4-26.  NLINFO Itemnum/Item Values (cont.) 

-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
| Itemnum  | Mnemonic |                           Item Description                            |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    7     |    CA    | Returns the table containing the day of the week in an 84 byte array. |
|          |          | Each day is 12 bytes long (with blank padding as needed).  The table  |
|          |          | starts with Sunday.  For example, the day name table is:              |
|          |          | "SUNDAY  MONDAY  TUESDAY...SATURDAY"                                  |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    8     |    CA    | Returns the YES/NO responses in a 12 byte array; the first 6 bytes    |
|          |          | contain the (upshifted) YES response; the second 6 bytes contain the  |
|          |          | (upshifted) NO response.                                              |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    9     |    CA    | Returns the symbols for decimal separator and thousands indicator in  |
|          |          | a 2 byte array.  The first byte contains the decimal separator, the   |
|          |          | second byte contains the thousands indicator.  The second byte can    |
|          |          | take a special value of 0.  Do not take this value literally as a     |
|          |          | thousands separator; it signifies the absence of a thousands          |
|          |          | separator for the language chosen.                                    |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    10    |    CA    | Returns the currency signs in a 6 byte array.  The first byte         |
|          |          | represents the short currency symbol (if any) used for business       |
|          |          | formats; the second byte is a flag indicating whether the currency    |
|          |          | symbol precedes or succeeds the number and whether the currency       |
|          |          | symbol is preceded or succeeded by blanks.  The last four bytes       |
|          |          | contain the full currency symbol.  The layout of the second byte is:  |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | Bits 0:40 - Currency symbol has no blanks preceding or succeeding it. |
|          |          |         1 - Currency symbol has a blank preceding it.                 |
|          |          |         2 - Currency symbol has a blank succeeding it.                |
|          |          |         3 - Currency symbol has blanks preceding and succeeding it.   |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | Bits 4:40 - Currency symbol precedes the number.                      |
|          |          |         1 - Currency symbol succeeds the number.                      |
|          |          |         2 - Currency symbol replaces the decimal separator.           |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    11    |   U16A   | Returns the collating sequence table.  A call to NLINFO itemnum=27    |
|          |          | determines the length of this array based on the length of the table  |
|          |          | of the native language specified.                                     |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    12    |    CA    | Returns the character set attribute table in a 256-element (256-half  |
|          |          | word) array.  Each character contains the numeric identification of   |
|          |          | the character type:                                                   |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | 0       Numeric character                                             |
|          |          |                                                                       |
|          |          | 1       Alphabetic lowercase character                                |
|          |          |                                                                       |
|          |          | 2       Alphabetic uppercase character                                |
|          |          |                                                                       |
|          |          | 3       Undefined graphic character                                   |
|          |          |                                                                       |
|          |          | 4       Special character                                             |
|          |          |                                                                       |
|          |          | 5       Control code                                                  |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    13    |    CA    | Returns the ASCII-to-EBCDIC translation table in a 256 byte array.    |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    14    |    CA    | Returns the EBCDIC-to-ASCII translation table in a 256 byte array.    |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    15    |    CA    | Returns the upshift table in a 256 byte array.                        |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    16    |    CA    | Returns the downshift table in a 256 byte array.                      |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------

          Table 4-26.  NLINFO Itemnum/Item Values (cont.) 

-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
| Itemnum  | Mnemonic |                           Item Description                            |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    17    |   U16A   | Returns the language numbers of all configured languages.  The first  |
|          |          | element of this array contains the number of configured languages.    |
|          |          | The second element contains the language number of the first          |
|          |          | configured language.  The third element contains the language number  |
|          |          | of the second configured language, and so forth.  (The langnum        |
|          |          | parameter is disregarded.)                                            |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    18    |   I16    | Returns -1 if the specified language is supported (configured) on the |
|          |          | system.  Otherwise, 0 is returned.                                    |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    19    |   I16    | Returns the character set ID number supporting the specified          |
|          |          | language.                                                             |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    20    |    CA    | Returns the uppercase name of the character set supporting the        |
|          |          | specified language in a 16 byte array.  If the name contains fewer    |
|          |          | than 16 bytes, it is padded with blanks.                              |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    21    |    CA    | Returns the uppercase name of the specified language in a 16 byte     |
|          |          | array.  If the name contains fewer than 16 bytes, it is padded with   |
|          |          | blanks.                                                               |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    22    |    CA    | Passes a language name or number (in ASCII digits) terminated by a    |
|          |          | blank.  The array can be <= 16 bytes.  The associated language ID     |
|          |          | number is returned to langnum.                                        |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    23    |   I16    | Returns -1 if the character set specified is supported (configured)   |
|          |          | on the system.  Otherwise, 0 is returned.                             |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    24    |    CA    | Passes a character set name or number (in ASCII digits) terminated by |
|          |          | a blank.  The array can be <= 16 bytes.  The associated character set |
|          |          | ID number is returned to langnum.                                     |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    25    |    CA    | Returns the uppercase name of the specified character set in a 16     |
|          |          | byte array.  The langnum parameter must contain the ID number of the  |
|          |          | character set.  If the name contains fewer than 16 bytes, it is       |
|          |          | padded with blanks.                                                   |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    26    |   I16    | Returns the class number of the specified language.                   |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    27    |   I16    | Returns the length (in half words) of the collating sequence table of |
|          |          | the specified language (see itemnum= 11).                             |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    28    |   I16    | Returns the length (in half words) of the national-dependent          |
|          |          | information table.  If no national table exists for the specified     |
|          |          | language, error=4 is returned.                                        |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    29    |   U16A   | Returns the national-dependent information table.  To determine the   |
|          |          | size of this array, you must first obtain the length with a call to   |
|          |          | NLINFO itemnum=28.                                                    |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------

          Table 4-26.  NLINFO Itemnum/Item Values (cont.) 

-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
| Itemnum  | Mnemonic |                           Item Description                            |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    30    |    CA    | A 36 byte array where the long calendar format is returned.  It can   |
|          |          | contain arbitrary text and the following descriptors:                 |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | D       1-3 of these are replaced by an equal number of bytes from    |
|          |          |         the day abbreviation.                                         |
|          |          |                                                                       |
|          |          | W       1-12 of these are replaced by an equal number of bytes from   |
|          |          |         the day of week.                                              |
|          |          |                                                                       |
|          |          | dd      Numeric day of month.                                         |
|          |          |                                                                       |
|          |          | M       1-4 of these are replaced by an equal number of bytes from    |
|          |          |         the month abbreviation.                                       |
|          |          |                                                                       |
|          |          | O       1-12 of these are replaced by an equal number of bytes from   |
|          |          |         the month of year.                                            |
|          |          |                                                                       |
|          |          | mm      Numeric month of year.                                        |
|          |          |                                                                       |
|          |          | yy      Numeric year of century.                                      |
|          |          |                                                                       |
|          |          | Nyy     National year.                                                |
|          |          |                                                                       |
|          |          | NPyy    National year that can include a before-period symbol.        |
|          |          |                                                                       |
|          |          | E       1-8 of these are replaced by an equal number of bytes from    |
|          |          |         the emperor/country name.                                     |
|          |          |                                                                       |
|          |          | A literal character (~) can be used to indicate that one of the above |
|          |          | special characters are taken literally within a format.  For example, |
|          |          | a format of WWWWWWWWW, OOOOOOOOO dd, A.~D.yyyy                        |
|          |          |                                                                       |
|          |          | results in WEDNESDAY, NOVEMBER 21, A.D. 1984.                         |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    31    |    CA    | A 16 byte array where the currency name is returned.                  |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    32    |    CA    | An 8 byte array containing information about an alternate set of      |
|          |          | digits (Arabic only).                                                 |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | 0-1     Alternative digit separator (integer)                         |
|          |          |         0 - No alternative digits defined                             |
|          |          |         1 - Alternative digits defined                                |
|          |          |                                                                       |
|          |          | 2       Alternative digit 0                                           |
|          |          |                                                                       |
|          |          | 3       Alternative digit 9                                           |
|          |          |                                                                       |
|          |          | 4       "+" used with alternative digits                              |
|          |          |                                                                       |
|          |          | 5       "-" used with alternative digits                              |
|          |          |                                                                       |
|          |          | 6       Decimal separator used with alternative digits                |
|          |          |                                                                       |
|          |          | 7       Thousands separator used with alternative digits              |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------

          Table 4-26.  NLINFO Itemnum/Item Values (cont.) 

-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
| Itemnum  | Mnemonic |                           Item Description                            |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    33    |    CA    | A 4 byte array containing information about the direction of the      |
|          |          | language.                                                             |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | 0-1     Language direction (integer)                                  |
|          |          |         0 - Direction is left-to-right                                |
|          |          |         1 - Direction is right-to-left                                |
|          |          |                                                                       |
|          |          | 2       The right-to-left space                                       |
|          |          |                                                                       |
|          |          | 3       Undefined                                                     |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    34    |   U16    | A logical value that returns the data ordering of the language.       |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | 0       Keyboard order                                                |
|          |          |                                                                       |
|          |          | 1       Left-to-right screen order                                    |
|          |          |                                                                       |
|          |          | 2       Right-to-left screen order                                    |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    35    |   U16    | A logical value that returns the language character size.             |
|          |          |                                                                       |
|          |          |                                                                       |
|          |          | 0       1 byte characters (8-bits)                                    |
|          |          |                                                                       |
|          |          | 1       2 byte characters (16-bits)                                   |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------
|          |          |                                                                       |
|    36    |   U16    | A logical value that returns a true (1), if the language requires     |
|          |          | suppressing the leading zero or a blank in the date format.           |
|          |          |                                                                       |
-----------------------------------------------------------------------------------------------

Related Information 

Intrinsics            ALMANAC, NLGETLANG

Commands              None

Manuals               Native Language Programmer's Guide (32650-90022)



MPE/iX 5.0 Documentation