"Lexical order" is another term for "alphabetical order". A "lexical order" defines an ordering of each character in a character set. By assigning an order number to each character, strings can be compared in a meaningful way with "<", ">", and MAT SORT. Different languages have different lexical orders.
The statement LEXICAL ORDER IS can be used to specify lexical order rules. The current LEXICAL ORDER is returned by the SYSTEM$("LEXICAL ORDER IS") function.
Rules for five languages are built into HTBasic: ASCII, FRENCH, GERMAN, SPANISH, and SWEDISH. (In HTBasic, LEXICAL ORDER IS STANDARD is equivalent to LEXICAL ORDER IS ASCII). These languages are inclusive enough to support most ordering conventions. If the language you are using is not listed, check the LEXICAL ORDER tables near the end of this section to see which most nearly matches your language. You may define your own ordering rules as explained later in this section.
In Japanese mode, HTBasic defaults to LEXICAL ORDER IS STANDARD.
You must have the correct character set active for the built-in rules to function correctly. Limited support for Roman-8 on operating systems that don’t support it is explained later in this section.
Execute one of the following statements to specify lexical ordering rules: