Initializing help system before first use

# setparam

Purpose
Set the value of a control parameter.
Synopsis
`procedure setparam(name:string,val:integer|string|real|boolean)`
Arguments

name | Name of a control parameter (case insensitive).
val | New value for the control parameter

Example
See example of function getparam.
Further information
1. Control parameters 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 value must correspond to the type expected by the parameter.
2. This procedure can be applied only to control parameters the value of which can be modified.
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, supported by Mosel, can be altered with this procedure:

realfmt | Default C printing format for real numbers (string, default: "%.10g")
zerotol | zero tolerance in comparisons between reals (non-negative real strictly smaller than 1, default: 1.0e-13), see Section Boolean expressions. This parameter is also used when displaying reals if the parameter txtztol is true: any value smaller than the zero tolerance is handled like the zero constant
txtztol | decide whether values smaller than the zero tolerance must be reported as the zero constant when converting a real value to its textual representation (Boolean, default: true)
ioctrl | specify whether the interpreter ignores IO errors (Boolean, default: false). When ioctrl is enabled it is required to get (and reset) the iostatus parameter (see getparam) after every IO operation. Not doing so may result in undefined behavior
mathctrl | specify whether the interpreter ignores Maths errors (Boolean, default: false)
readcnt | generate per label counting when executing `initializations from' blocks (Boolean, default: false)
UTC | indicate whether the time functions return time expressed in local (false) or UTC (true) time (Boolean, default: false)
autofinal | indicate whether initialisation from blocks are finalizing sets (Boolean, default: true or false if compiler option noautofinal is used)
workdir | specify the current working directory of the model (string, initialised with the current working directory of the Mosel instance). The provided value can be a relative path ( e.g. "../somedir")
recloc | enable (or disable) automatic recording of source location of constraints definitions (Boolean, default: false). This parameter can be set to true only if the model has been compiled with option -G; it makes it possible the creation of meaningful constraint names when exporting a matrix (see exportprob)
localedir | directory where message catalogs are stored (string, default: "./locale")
bimprefix | list of bim file prefixes (string). This parameter is used to locate packages when compiling a model ( compile) and loading a bim file ( load), see Section Directive uses.

5. The parameter realfmt requires a format of the form %[f][w][.p]c where f (flags) is an optional string of 1 to 3 characters from the list '#0 -+'; w (width) an optional string of 1 to 3 digits (the first one cannot be 0); p (precision) an optional string of 1 to 2 digits and c (conversion specifier) a character from the list 'eEfgGaAjy' (see formattext for further details). The conversion specifiers j and y are Mosel extensions to the C standard that support the optional flags and width (precision is ignored): they produce a reversible textual representation of the real number ( i.e. converting the string back to real restores the exact original value). The format 'j' generates a decimal notation similar to the specification ECMA-262 ( e.g. "123.456") while the format 'y' produces a scientific notation in all cases ( e.g. "1.2345e2").
Related topics
getparam, setdsoparam, localsetparam, restoreparam.
Parent Topic Predefined functions and procedures

© 2001-2026 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.