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

NLSCANMOVE

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

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:2Alphabetic (NLINFO item 12, types 1 and 2):
1 - Lowercase
2 - Uppercase
3 - Uppercase/lowercase
13:1Numeric (NLINFO itemnum=12, type 0)
12:1Special; NLINFO itemnum=12, types:
3 - Undefined graphic character
4 - Special character
5 - Control code
11:1WHILE/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:2Shift:
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

* Does 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, NLCOLLATE2, NLFINDSTR, NLJUDGE, NLKEYCOMPARE, NLREPCHAR, NLSUBSTR, NLSWITCHBUF, NLTRANSLATE
Manuals Native Language Programmer's Guide




NLREPCHAR


NLSUBSTR