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

NLSCANMOVE

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

NM and CM callable.

Scans and moves character strings according to character attributes. This function is handled in a language-dependent manner.

Syntax

   I16                  CA      CA      U16V

   numchar:=NLSCANMOVE(inbuffer,outbuffer,flags,

                           I16V      I16V    U16A

                       bufferlength,langnum,error,

                         U16A  CA

                       charset,shiftinfo);

Functional Return

numchar

16-bit signed integer (assigned functional return)

Contains the number of characters acted upon in the scan or move function.

Parameters

inbuffer

character array (required)

Passes the source string.

outbuffer

character array (required)

Returns the target string.

NOTE: If outbuffer and inbuffer are the same string, this intrinsic performs a scan function. Otherwise, a move function is performed.
flags

16-bit unsigned integer by value (required)

Contains the flag defining the options for calling the intrinsic and defines the condition for terminating the scan or move function.

BitsValue/Meaning
14:2

Alphabetic (NLINFO item 12, types 1 and 2):

1

Lowercase

2

Uppercase

3

Uppercase/lowercase

13:1Numeric (NLINFOitemnum=12, type 0)
12:1

Special; NLINFO itemnum=12, types:

3

Undefined graphic character

4

Special character

5

Control code

11:1

WHILE/UNTIL option, if:

0

String scanned while the condition (specified by flags (12:4)) is true

1

String scanned until the condition (specified by flags (12:4)) is true

9:2

Shift:

1

Upshift

2

Downshift

0:9Reserved for the operating system

bufferlength

16-bit signed integer by value (required)

Passes the maximum number of bytes to be acted upon during the indicated function.

langnum

16-bit signed integer by value (required)

Contains the language ID number, specifying both the character set definitions of character attributes and the language-specific shift.

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
3Overlapping strings; outbuffer overwrites inbuffer
4Invalid bufferlength parameter
5*NLS internal error
6*NLS internal error
7Reserved portion of flags not 0
8Upshift and downshift requested
9Invalid table element

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

charset

16-bit unsigned integer array (optional)

Passes the character set definition for the language used, as returned in NLINFO itemnum=12. If present, the langnum parameter is ignored, and this routine is much more efficient.

shiftinfo

character array (optional)

Passes shift information for a desired upshift or downshift (for example, as returned in NLINFO items 15 or 16 ). This parameter is utilized when bits (9:2) of flags are not equal to 0. If present, the langnum parameter is ignored, and this routine is much more efficient.

Related Information

Intrinsics

NLCOLLATE, NLKEYCOMPARE, NLREPCHAR, NLSWITCHBUF, NLSTRANSLATE

Commands

None

Manuals

Native Language Programmer's Guide (32650-90022)

Feedback to webmaster