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

NLFINDSTR

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

NM and CM callable.

Searches string1 for string2, and returns an integer value indicating the offset in string1 where string2 was found.

Syntax

    I16               I16V    CA     I16V    CA

   offset:=NLFINDSTR(langnum,string1,length1,string2,

                     I16V   U16A   U16A

                     length2,error,charset);

Functional Return

offset

16-bit signed integer (assigned functional return)

Returns a -1 if string2 is not found in string1.

Parameters

langnum

16-bit signed integer by value (required)

Contains the language ID number.

string1

character array (required)

Contains the string of characters to be searched. It can contain 1 byte and 2 byte Asian characters.

length1

16-bit signed integer by value (required)

Passes the length, in bytes, of string1.

string2

character array (required)

Contains the character string to be searched for.

length2

16-bit signed integer by value (required)

Passes the length, in bytes, of string2.

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 length1 parameter
4Invalid length2 parameter
5*NLS internal error
6*NLS internal error

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

charset

16-bit unsigned integer array (optional)

Contains the character set definition for the language to be used, as returned by itemnum= 12 of the NLINFO intrinsic. When specifying a character set, be sure that the language ID used matches the character set.

Operation Notes

Split-stack calls are not permitted.

Related Information

Intrinsics

NLCOLLATE, NLJUDGE, NLKEYCOMPARE, NLREPCHAR, NLSCANMOVE, NLSWITCHBUF, NLTRANSLATE

Commands

None

Manuals

Native Language Programmer's Guide (32650-90022)

Feedback to webmaster