Native Language Support [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
Native Language Support
This section summarizes the features of HP Business BASIC/XL that
facilitate the production of native language independent code. Refer to
the Native Language Programmer's Guide for more information on Native
Language Support or NLS.
Selecting a Native Language
HP Business BASIC/XL determines the native language number at the
start-up of the interpreter and when a compiled program is executed by
making the following checks in the order shown:
1. The initial default is NATIVE-3000 (Language #0).
2. The operating system default language is determined by the NLINFO
intrinsic.
3. The HP Business BASIC/XL configuration file is checked for
language specification.
4. The value of the MPE NLDATALANG job control word or jcw is used if
defined.
At all times while running the HP Business BASIC/XL interpreter and
executing a compiled HP Business BASIC/XL program, there is an associated
native language number. This number is referred to as the underlying
native language number in this section, and in the descriptions of NLS
statements and in NLS functions.
Displaying the Native Language Number
The INFO command displays the language number and the name of the
language in the following format:
Native Language 0(Native-3000)
Changing the Native Language Number
The underlying native language number can be changed with the RUN and
SCRATCH ALL commands. Each time the RUN command is issued, HP Business
BASIC/XL checks the value of the MPE jcw, NLDATALANG. If it is defined
and has a different value from the current native language number, then
the native language number changes. This causes HP Business BASIC/XL to
open the message catalog appropriate for that language (HHBBCnnn.PUB.SYS
for language nnn; for example, HPBBC009.PUB.SYS for Italian). If it is
not possible to open that catalog, HHBBCAT.PUB.SYS is used instead.
The native language can also be changed by the SCRATCH ALL command. The
SCRATCH ALL command follows the same procedure outlined under "Selecting
a Native Language" for determining a language number. If this results in
a number that is different from the current one, the native language
number changes.
Changing the NLDATALANG jcw does not affect the underlying native
language number until the next RUN or SCRATCH ALL command is executed.
Obviously, the language number cannot change during the execution of a
compiled program.
The ways of changing the NLDATALANG jcw include the following:
* Using HP Business BASIC/XL's "SYSTEM" command:
>SYSTEM "setjcw nldatalang=3"
* Using HP Business BASIC/XL's ":" escape:
>:setjcw nldatalang=3
String Functions
Relevant string functions have been enhanced to allow an option numeric
argument that specifies a native language number. In each case, if the
argument's value is -1, the underlying native language number is used as
the language specifier. If a non-negative value is used, that number is
taken directly as the language specifier. If the native language option
is not specified, then the option defaults to zero. The following
functions include parameters for NLS:
LWC$
UPC$
LEX
DATE$
TIME$
These functions are defined and explained in chapter 5.
MPE/iX 5.0 Documentation