Initializing help system before first use

getparam

Purpose
Get the current value of a control parameter.
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 
Default C printing format for real numbers (string)
zerotol 
zero tolerance in comparisons between reals (real)
txtztol 
zero tolerance is used when converting real values to their textual representation (Boolean)
ioctrl 
the interpreter ignores IO errors (Boolean)
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 
number of items recognized by the last read procedure or read in by the last initializations block (integer)
readcnt 
generate per label counting when executing `initializations from' blocks (Boolean)
UTC 
indicate whether the time functions return time expressed in local (false) or UTC (true) time (Boolean)
autofinal 
indicate whether initialisation from blocks are finalizing sets (Boolean)
tmpdir 
the Mosel temporary directory (string)
workdir 
the current working directory of the model (string)
restrict 
active restrictions (integer). See Section mosel command: restricted mode for further details.
modelname 
internal unique name of the model being executed.
modelnumber 
order number of the model being executed.
recloc 
indicate whether automatic recording of source location of constraints definitions is active (Boolean)
localedir 
directory where message catalogs are stored (string)
lang 
current language (string)
runparams 
parameter string used for the current execution (string)
bimprefix 
list of bim file prefixes (string)
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 
number of the line being parsed (integer)
parser_file 
current source file name (string)
parser_date 
current local date (string)
parser_time 
current local time (string)
parser_UTCdate 
current UTC date (string)
parser_UTCtime 
current UTC time (string)
parser_version 
Mosel version (string)
model_version 
Version of the model as given by the version directive (string)

Related topics

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.