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

NLCOLLATE

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM and CM callable.

Collates two character strings according to the specified language collating sequence and determines a lexical ordering.

Syntax



             CA       CA       I16V          I16
  NLCOLLATE (buffer1, buffer2, bufferlength, result,
             I16V     U16A   U16A
             langnum, error, collseq);

Parameters


buffer1

character array (required)

Passes the first character string to be collated.

buffer2

character array (required)

Passes the second character string to be collated.

bufferlength

16-bit signed integer by value (required)

Passes the length (in bytes) of buffer1 and buffer2.

result

16-bit signed integer by reference (required)

Returns the result of the collated character strings (buffer1 and buffer2):

ValueMeaning
0buffer1 collates equal to buffer2
-1buffer1 collates before buffer2
1buffer1 collates after buffer2

The result is 0 if a nonzero error is returned.

langnum

16-bit signed integer by value (required)

Contains the language ID number, specifying the collating sequence 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 collating table entry
4Invalid bufferlength parameter
5*NLS internal error
6*NLS internal error

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

collseq

16-bit unsigned integer array (optional)

Passes the native language collating sequence table as returned by itemnum=11 of the NLINFO intrinsic. If this parameter is present, langnum is ignored, and this routine is more efficient. Refer to itemnums 11 and 27 of the NLINFO intrinsic.

Related Information


Intrinsics NLCOLLATE2, NLFINDSTR, NLJUDGE, NLKEYCOMPARE, NLREPCHAR, NLSCANMOVE, NLSUBSTR, NLSWITCHBUF, NLTRANSLATE
Manuals Native Language Programmer's Guide




NLAPPEND


NLCOLLATE2