GLOBAL_VARIABLE
This keyword defines global variables that can be used as:
(i) replace inline commands identified by the tag @ and end by a whitespace, or
(ii) in script commands by the statement get_var().
The global variable can be either a numerical value or a alphanumeric value. In case of an alphanumeric value, the name should end with $.
Numerical global variables can be defined either as a number or as a set of simple arithmetic expressions (see below).
Definition
#Define numerical or alphanumerical global variable
global_variable <:txt:name> <flt:value> [<str:description>]
global_variable <:txt:name>$ <str:value_text> [<str:description>]
#Define global variable as a set of arithmetic expressions
global_variable <:txt:name> = <exp:value_exp> [<str:description>]
Explanation
|
name |
txt |
Name of the variable. The name is used for the inline command or as argument in the script statements get_var(), put_var() and get_varexist(). When the name ends with $, the variable is a alfanumerical value (string variable); otherwise it is a numerical value. |
|
value |
flt |
Value linked to the global variable |
|
value_text |
string |
String value linked to the global variable, if name ends with $ |
|
value_exp |
exp |
Inline expression to define global variable- see "Definition of inline variables" and "Examples of inline definition and use" |
|
description |
string |
Description of the global variable. This description is not used by HP and serves only as information for the user. |
Notes
There are a few default names for global variables - see "System inline variables"
A global variable can also be defined with a script using the statement put_var(). In addition, the value of a previously defined global variable can be changed using the same statement.
In a multi-threading run of HPx, global variables are assigned to a given thread. There is no exchange of global variables betweent threads when transport calculations start. Global variables are defined for all threads when they are defined with GLOBAL_VARIABLE key words or in scripts which are executed before the transport calculations start (e.g. CALCULATED_VALUES with -state equal to definition or initial).