IUScriptOrder
IUScriptOrder Indicate sort order for two scripts
#include <Packages.h> International Utilities Package
short IUScriptOrder( script1, script2);
ScriptCode script1; code indicating first script
ScriptCode script2; code indicating second script
returns -1 if (ab)
Given a pair of script codes,IUScriptOrder indicates in what order the text
in the two scripts should be sorted
script1 and . . .
script2 are the script codes of the scripts to be compared.
Returns: a short;-1, 1, or 0, depending on whether text in the first script
should be sorted before, after, or in the same place as text in the
second script. The system script is always sorted first

Notes: With System 7.0, the new IUScriptOrder, IULangOrder,
IUStringOrder, IUTextOrder, and IUGetItlTable routines accept
special script or language codes. These script and language codes facilitate
the process of sorting text between scripts and languages. For these
routines, System 7.0 has defined these new types: ScriptCode and
LangCode. A valid ScriptCode type can be an integer in the range 0-64
that explicitly indicates a particular script, or it can be a negative value
with a special meaning. A valid LangCode type can be a nonnegative integer
that explicitly indicates a particular language, or it can be a negative value
with a special meaning.
Valid values for a parameter of type ScriptCode are integers in the range
0-64 that explicitly indicate a particular script, or one of the following
negative values:
Constant Meaning
iuSystemScript System script
iuCurrentScript Current script (from FontScript)
Not all of the routines that have ScriptCode or LangCode parameters
support all of the special negative values; the exceptions are noted in
relevant routine de scriptions. For details see the section entitled
Accessing the International Resources .
IUStringOrder and IUTextOrder use IUScriptOrder, IULangOrder,
and IUMagPString to return -1, 0, or 1, indicating the proper ordering
of strings that may be in different scripts or languages. If the result of
IUScriptOrder is not 0, then it is returned as the result of
IUStringOrder or IUTextOrder. If the result is 0, aLang and bLang are
checked; if these are different, then they determine the function result. If
they are not different, the strings are in the same script and language and
are compared using the sorting for that script and language. If that script is
not installed and enabled, the sorting is performed using the script specified
by IntlScript
For all of these sorting functions, invalid script or language codes are
sorted after valid ones. Note that these functions can move memory.