Initializing help system before first use

Structure of a Mosel model

A Mosel model (text file with extension .mos) has the form

model model_name

  Compiler directives

  Parameters

  Body

end-model
Compiler directives
  • Options are specified as a compiler directive, at the beginning of the model
  • Options include explterm, which means that each statement must end with a semi-colon, and noimplicit, which forces all objects to be declared
    options explterm
    options noimplicit
  • uses statements are also compiler directives
    uses "mmxprs", "mmodbc"
  • Can define a version number for your model
    version 1.0.0
Run-time parameters
  • Scalars (of type integer, real, boolean, or string) with a specified default value
  • Their value may be reset when executing the model
  • Use initializations from for inputting structured data (arrays, sets,...)
  • At most one parameters block per model
Model body
  • Model statements other than compiler directives and parameters, including any number of
    • declarations
    • initializations from / initializations to
    • functions and procedures
Implicit declaration
  • Mosel does not require all objects to be declared
  • Simple objects can be used without declaring them, if their type is obvious
  • Use the noimplicit option to force all objects to be declared before using them (see item Compiler directives above)
Mosel statements
  • Can extend over several lines and use spaces
  • However, a line break acts as an expression terminator
  • To continue an expression, it must be cut after a symbol that implies continuation (e.g. + - , * )

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