getparam
getparam |
Purpose
Synopsis
function getparam(name:string):integer|string|real|boolean
Argument
name
|
Name of the control parameter whose value is to be returned (case insensitive).
|
Return value
Current setting of the control parameter.
Further information
1. Parameters whose values may be returned by this function include the settings of Mosel as well as those of any loaded module or package. The location of the parameter may be specified by prefixing its name with the name of the module or package defining it (
e.g.
mmxprs.XPRS_verbose). The type of the return value corresponds to the type of the parameter.
2. This function can be applied only to control parameters whose value can be accessed.
3. The
name argument must be a constant string: a model parameter, variable or string expression cannot be used as a control parameter name.
4. The following control parameters are supported by Mosel:
realfmt
|
|
zerotol
|
|
ioctrl
|
|
iostatus
|
status of the last IO operation
(integer), which is 0 when the last operation has been executed successfully. This parameter is automatically reset once its value has been read. Not doing so may result in undefined behavior. When
ioctrl is active the IO status must be read (and reset) after every IO operation
|
nbread
|
|
readcnt
|
|
UTC
|
|
autofinal
|
|
tmpdir
|
|
workdir
|
|
restrict
|
active restrictions (integer). See Section
mosel command: restricted mode for further details.
|
modelname
|
|
modelnumber
|
|
recloc
|
|
localedir
|
|
lang
|
|
runparams
|
|
bimprefix
|
|
sharingstatus
|
sharing status of the model (integer). This parameter is
-1 if the model does not share any data;
0 if the model shares data but no submodel is using it;
1 when shared data is in use;
2 if the model is a submodel using shared data (see Section
Data sharing between models)
|
5. Function
getparam may also be used to retrieve
parser parameters
. As opposed to the other parameters whose value is computed at run time, these parameters are evaluated as soon as they are parsed:
parser_line
|
|
parser_file
|
|
parser_date
|
|
parser_time
|
|
parser_UTCdate
|
|
parser_UTCtime
|
|
parser_version
|
|
model_version
|
Related topics