HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

NLTRANSLATE

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

NM and CM callable.

Translates a string of characters from EBCDIC-to-ASCII or ASCII-to-EBCDIC using the appropriate native language table.

Syntax

                 I16V       CA      CA

   NLTRANSLATE(transcode,inbuffer,outbuffer,

                 I16V    I16V    U16A

               bufferlength,langnum,error,

                   CA

               transtable);

Parameters

transcode

16-bit signed integer by value (required)

Passes the translation direction:

ValueMeaning
1EBCDIC-to-ASCII translation
2ASCII-to-EBCDIC translation

inbuffer

character array (required)

Passes the string to be translated.

outbuffer

character array (required)

Contains the translated string. The parameters inbuffer and outbuffer can specify the same array.

bufferlength

16-bit signed integer by value (required)

Passes the number of bytes of inbuffer to be translated.

langnum

16-bit signed integer by value (required)

Contains the language ID number, specifying which translation tables are to be used.

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:

ValueMeaning
0Successful
1*NLS not installed
2*Specified language not configured
3Invalid transcode specified
4Invalid length parameter
5*NLS internal error
6*NLS internal error

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

transtable

character array (optional)

Passes a translation table in a 256 byte array. Each byte contains the translation of the byte whose value is its index. This parameter corresponds to itemnums 13 and 14 of the NLINFO intrinsic. If present, the langnum parameter is ignored, and this routine is more efficient.

Operation Notes

This intrinsic performs the same function as CTRANSLATE, using native language tables.

The inbuffer parameter is translated into outbuffer for length of bufferlength, using a translation table, and is determined as follows:

  1. If transtable is present, a translation is made using transtable.

  2. If langnum equals NATIVE3000/XL, a standard ASCII-to-EBCDIC or EBCDIC-to-ASCII translation is made.

  3. The ASCII-to-EBCDIC or EBCDIC-to-ASCII translation table for the language specified is used.

Related Information

Intrinsics

NLCOLLATE, NLKEYCOMPARE, NLREPCHAR, NLSUBSTR

Commands

None

Manuals

Native Language Programmer's Guide (32650-90022)

Feedback to webmaster