LoadEnviroment Statement Summary
LoadEnviroment is a terminal, command statement that can occur only in command scripts. Before any code can be processed the environment within which that compilation is to occur must be established. For a given command script the loading of this information occurs only once. The compiler checks if this load has occurred before it executes a
Compile or
Referencestatement. This statement can force the load to occur immediately in case it is needed for some special context.
The
LoadEnviromentstatement has no attributes.
The environment is described via three optional files: an Environment file, a TypeInference file, and a GlobalSettings file.
The Environment file is a reference script. It is normally created once by the user and contains settings that should always be used for a given code base. It is called
Environment.%id%.xml and typically contains
Select and
Registry commands. It may be placed in any one of the search locations, but is normally placed in the
targetlocation.
The TypeInferences file is reference script. It is normally authored by
gmBasic to report the type inferences that it has made while processing a code base. The purpose in creating this file is to give subsequent compilations knowledge about the ultimate types of the symbols that are weakly typed in the source code. This knowledge can then improve the quality of the translations. It is called
TypeInference.%id%.xml and as authored by
gmBasic contains only
FixType Registry statements. It may be placed in any one of the search locations, but as authored it is sent to the
Locallocation.
The GlobalSettings file is a pre compiled virtual binary information file built using a command script. It may contain any kind of information, though present applications only use
Reference,
Registry, and
gmSL statements within the scripts that create GlobalSettings files. The full pathname is specified via a
GlobalSettings="filename"
Select attribute. Many entries in the
GlobalSettings file are authored either by
gmBasic or by the user via
gmNI event handlers. It is discussed further under the description of the
Registry statement.