Try
GetMode("1")
True→V2XX
Else
False→V2XX
ClrErr
EndTry
The V2XX variable will contain True if language localisation is supported, or False otherwise. It is
convenient if the V2XX variable is a global variable, so that it can be used by functions to test for the
version.
2) Almost all function names are language dependent so programs/functions can only be tokenised in
the language they are written. In other words, if you have written a program in English it can only be
run if the language setting is set to English. But that is only the first time it is run. If the program is
executed one time with the correct language setting, the language can be changed to any other
language and the program will still work correctly. The program can even be edited in another
language, just remember to run the program one time before changing language. To save a language
independent program, just make sure that the program is executed one time before transferring it with
GraphLink.
3) Testing for a specific variable type in an unknown language using getType()
The following method can be used in programs/functions in all AMS versions.
Local TypeList,TypeMat
@ Acquiring the system for the type-name of a list.
{}→TypeList
getType(TypeList)→TypeList
@ Acquiring the system for the type-name of a matrix.
[0,0]→TypeMat
getType(TypeMat)→TypeMat
@ Testing if a variable is the type List.
If getType(var)=TypeList Then
...
4) Setting/Testing a mode without knowing the language depending name.
When handling modes under language localisation only mode numbers should be used, because of
some problem in the system with handling names containing foreign characters. This means is it
necessary to know the mode numbering from Appendix D of the AMS 2.03 manual.
To set a mode and restore it:
Local Mode,OldMode
@ Set Graph=Function
If V2XX Then
"1"→Mode
SetMode(Mode,"1")→OldMode
ELSE
"Graph"→Mode
SetMode(Mode,"Function")→OldMode
Endif
...
SetMode(Mode,OldMode)
7 - 3