(!******************************************************
Mosel User Guide Example Problems
=================================
file annotdoc.mos
`````````````````
Defining documentation annotations.
(c) 2015 Fair Isaac Corporation
author: S. Heipcke, Mar. 2015
*******************************************************!)
model "Using annotations"
(!@doc.
@title An example of model documentation
@date March 2015
@chapter Introduction
@p
This model needs to be compiled with the -D compiler option
to include the documentation annotations into the BIM.
The moseldoc program takes the resulting BIM file as input.
!)
!@doc.chapter The example
!@doc.section Parameters
parameters
!@doc.descr Short parameter description
!@doc.value v1 possible value
!@doc.value v2 another possible value
!@doc.info Some more explanation (longer text)
MYPAR="some text"
end-parameters
!@doc.section Constants and variables
public declarations
(!@doc.
@descr Short description of the constant set
@info Some additional information
!)
S=1..10
!@doc.descr An error code constant
MYERR=11
(!@doc.
@descr A record type
@recflddescr fld1 field description
@recflddescr fld2 another field description
@info Several @doc.info tags can be used for a given entity
@info Entities can be referenced: rectype
!)
rectype=record
fld1:integer
fld2:string
end-record
end-declarations
!@doc.section Subroutines
(!@doc.
@descr A short description
@param i first parameter
@paramval i value1 description of value1
@paramval i value2 description of value2
@param r second parameter
@err MYERR reference to an error code constant
@return The return value
@example Some descriptive text for the example
@example [SRC]
the example code is here
@info Some useful information for myfunct
@related myotherfunct
!)
function myfunct(i:integer,r:real):boolean
returned:=i>r
end-function
!@doc.group myfunct
!@doc.info myotherfunc is an alternative to myfunct
function myotherfunc(i:integer):boolean
returned:=true
end-function
end-model
|